diff --git "a/data_all_eng_slimpj/shuffled/split2/finalzzjqfz" "b/data_all_eng_slimpj/shuffled/split2/finalzzjqfz" new file mode 100644--- /dev/null +++ "b/data_all_eng_slimpj/shuffled/split2/finalzzjqfz" @@ -0,0 +1,5 @@ +{"text":"\\section{\\uppercase{Introduction}}\n\n\\noindent\nThere is a generalized consensus that knowledge repositories are a key\ningredient in the whole process of Knowledge Management,\ncf.~\\cite{Duhon98,Konig2012}.\nFurthermore, being able to rely upon the consistency of the information they\nprovide is paramount to any business whatsoever.\nDatabases and database management systems, by far the most common framework for\nknowledge storage and retrieval, have been around for many years now,\nand have evolved substantially, at pace with information technology.\nIn this paper, we are focusing on the important aspect of database consistency.\n\nTypical database management systems allow the user to specify\nintegrity constraints on the data as logical statements that are\nrequired to be satisfied at any given point in time.\nThe classical problem is how to guarantee that such constraints still\nhold after updating databases~\\cite{Abiteboul1988}, and what repairs\nhave to be made when the constraints are violated~\\cite{Katsuno1991},\nwithout making any assumptions about how the inconsistencies came about.\nRepairing an inconsistent database~\\cite{Eiter1992} is a highly\ncomplex process; also, it is widely accepted that human\nintervention is often necessary to choose an adequate repair.\nThat said, every progress towards automation in this field is nevertheless important.\n\nIn particular, the framework of active integrity\nconstraints~\\cite{Flesca2004,Caroprese2011} was introduced more recently with the\ngoal of giving operational mechanisms to compute repairs of\ninconsistent databases.\nThis framework has subsequently been extended to consider\npreferences~\\cite{Caroprese2007} and to find ``best'' repairs\nautomatically~\\cite{CEGN2013} and efficiently~\\cite{lcf:14}.\n\nActive integrity constraints (AICs) seem to be a promising framework\nfor the purpose of achieving reliability in information retrieval:\n\\begin{itemize}\n\\item AICs are expressive enough to encompass the majority of\n integrity constraints that are typically found in practice;\n\\item AICs allow the definition of preferred ways to calculate\n repairs, through specific actions to be taken in specific\n inconsistent situations;\n\\item AICs provide mechanisms to resolve inconsistencies while the\n database is in use;\n\\item AICs can enhance databases to provide a basis for self-healing\n autonomic systems.\n\\end{itemize}\nTo the best of our knowledge, no real-world implementation of an\nAIC--enhanced database system exists today.\nThis paper presents a prototype tool that implements the tree--based\nalgorithms for computing repairs presented\nin~\\cite{Caroprese2011,CEGN2013}.\nWhile not yet ready for productive deployment, this implementation can\nwork successfully with database management systems working in the SQL\nframework, and is readily extendible to other (nearly arbitrary)\ndatabase management systems thanks to its modular design.\n\nThis paper is structured as follows.\nSection~\\ref{sec:background} recapitulates previous work on active\nintegrity constraints and repair trees.\nSection~\\ref{sec:tool} introduces our tool, \\texttt{repAIrC}, and describes its\nimplementation, focusing on the new theoretical results that were\nnecessary to bridge the gap between theory and practice.\nSection~\\ref{sec:parallel} then discusses how parallel computation\ncapabilities are incorporated in \\texttt{repAIrC}\\ to make the search for repairs\nmore efficient.\nSection~\\ref{sec:concl} summarizes our achievements and gives a brief\noutlook into future developments.\n\n\\section{\\uppercase{Active integrity constraints}}\n\\label{sec:background}\n\n\\noindent\nActive integrity constraints (AICs) were introduced in~\\cite{Flesca2004} and\nfurther explored in~\\cite{Caroprese2009,Caroprese2011}, which define the basic\nconcepts and prove complexity bounds for the problem of repairing inconsistent\ndatabases.\nThese authors introduce declarative semantics for different types of repairs,\nobtaining their complexity results by means of a translation into revision\nprogramming.\nIn practice, however, this does not yield algorithms that are applicable to\nreal-life databases; for this reason, a direct operational semantics\nfor AICs was proposed in~\\cite{CEGN2013}, presenting database-oriented\nalgorithms for finding repairs.\nThe present paper describes a tool that can actually execute these algorithms in\ncollaboration with an SQL database management system.\n\n\\subsection{Syntax and Declarative Semantics}\n\nFor the purpose of this work, we can view a database simply as a set of atomic\nformulas over a typed function-free\nfirst-order signature $\\Sigma$, which we will assume throughout to be fixed.\nLet $\\mathcal At$ be the set of closed atomic formulas over $\\Sigma$.\nA database $\\I$ \\emph{entails} literal $L$, $\\I\\models L$, if $L\\in\\mathcal At$ and\n$L\\in\\I$, or if $L$ is $\\mathsf{not}\\ a$ with $a\\in\\mathcal At$ and $a\\notin\\I$.\n\nAn integrity constraint is a clause $$L_1,\\ldots,L_m \\supset \\bot$$ where each\n$L_i$ is a literal over $\\Sigma$, with intended semantics that\n$\\forall(L_1\\wedge\\ldots\\wedge L_m)$ should not hold.\nAs is usual in logic programming, we require that if $L_i$ contains a negated variable $x$, then $x$\nalready occurs in $L_1,\\ldots,L_{i-1}$.\nWe say that $\\I$ \\emph{satisfies} integrity constraint $r$, $\\I\\models r$, if,\nfor every instantiation $\\theta$ of the variables in $r$, it is the case that\n$\\I\\not\\models L\\theta$ for some $L$ in $r$; and $\\I$ satisfies a set $\\eta$ of\nintegrity constraints, $\\I\\models\\eta$, if it satisfies each integrity\nconstraint in $\\eta$.\n\nIf $\\I\\not\\models\\eta$, then $\\I$ may be updated through \\emph{update actions}\nof the form $+a$ and $-a$, where $a\\in\\mathcal At$, stating that $a$ is to be inserted\nin or deleted from $\\I$, respectively.\nA set of update actions $\\mathcal U$ is \\emph{consistent} if it does not contain both\n$+a$ and $-a$, for any $a\\in\\mathcal At$; in this case, $\\I$ can be updated by $\\mathcal U$,\nyielding the database\n$$\\I\\circ\\mathcal U = (\\I\\cup\\left\\{a\\mid{+a}\\in\\mathcal U\\right\\})\\setminus \\left\\{a\\mid{-a}\\in\\mathcal U\\right\\}\\,.$$\nThe problem of database repair is to find $\\mathcal U$ such that $\\I\\circ\\mathcal U\\models\\eta$.\n\n\\begin{definition}\n Let $\\I$ be a database and $\\eta$ a set of integrity constraints.\n A \\emph{weak repair} for $\\langle\\mathcal I,\\eta\\rangle$ is a consistent set $\\mathcal U$ of update actions\n such that:\n (i)~every action in $\\mathcal U$ changes $\\I$; and\n (ii)~$\\I\\circ\\mathcal U\\models\\eta$.\n A \\emph{repair} for $\\langle\\mathcal I,\\eta\\rangle$ is a weak repair $\\mathcal U$ for $\\langle\\mathcal I,\\eta\\rangle$ that is minimal w.r.t.\\ set\n inclusion.\n\\end{definition}\nThe distinction between weak repairs and repairs embodies the\nstandard principle of \\emph{minimality of change}~\\cite{Winslett1990}.\n\nThe problem of deciding whether there exists a (weak) repair for an\ninconsistent database is\n$NP$-complete~\\cite{Caroprese2011}.\nFurthermore, simply detecting that a\ndatabase is inconsistent does not give any information on how it can be\nrepaired.\nIn order to address this issue, those authors proposed active integrity constraints (AICs),\nwhich guide the process of selection of a repair by pairing literals with the\ncorresponding update actions.\n\nIn the syntax of AICs, we extend the notion of update action by allowing\nvariables.\nGiven an action $\\alpha$, the literal corresponding to it is $\\mathsf{lit}(\\alpha)$,\ndefined as $a$ if $\\alpha={+a}$ and $\\mathsf{not}\\ a$ if $\\alpha={-a}$; conversely, the\nupdate action corresponding to a literal $L$, $\\mathsf{ua}(L)$, is $+a$ if $L=a$ and\n$-a$ if $L=\\mathsf{not}\\ a$.\nThe \\emph{dual} of $a$ is $\\mathsf{not}\\ a$, and conversely; the dual of $L$ is denoted\n$L^D$.\nAn \\emph{active integrity constraint} is thus an expression $r$ of the form\n$$L_1,\\ldots,L_m \\supset \\alpha_1\\mid\\ldots\\mid\\alpha_k$$\nwhere the $L_i$ (in the \\emph{body} of $r$, $\\body r$) are literals and the\n$\\alpha_j$ (in the \\emph{head} of $r$, $\\head r$) are update actions, such that\n\\[\\left\\{\\mathsf{lit}(\\alpha_1)^D,\\ldots,\\mathsf{lit}(\\alpha_k)^D\\right\\}\\subseteq\\left\\{L_1,\\ldots,L_m\\right\\}\\,.\\]\nThe set $\\mathsf{lit}(\\head r)^D$ contains the \\emph{updatable} literals of $r$.\nThe \\emph{non-updatable} literals of $r$ form the set\n$\\mathsf{nup}(r)=\\body r\\setminus\\mathsf{lit}\\left(\\head r\\right)^D$.\n\nThe natural semantics for AICs restricts the notion of weak repair.\n\n\\begin{definition}\n Let $\\I$ be a database, $\\eta$ a set of AICs and $\\mathcal U$ be a (weak) repair for\n $\\langle\\mathcal I,\\eta\\rangle$.\n Then $\\mathcal U$ is a \\emph{founded (weak) repair} for $\\langle\\mathcal I,\\eta\\rangle$ if, for every action\n $\\alpha\\in\\mathcal U$, there is a closed instance $r'$ of $r\\in\\eta$ such that\n $\\alpha\\in\\head{r'}$ and $\\I\\circ\\mathcal U\\models L$ for every\n $L\\in\\body{r'}\\setminus\\left\\{\\mathsf{lit}(\\alpha)^D\\right\\}$.\n\\end{definition}\n\nThe problem of deciding whether there exists a weak founded repair for an\ninconsistent database is again $NP$-complete, while the similar problem for\nfounded repairs is $\\Sigma^P_2$-complete.\nDespite their natural definition, founded repairs can include circular support\nfor actions, which can be undesirable; this led to the introduction of justified\nrepairs~\\cite{Caroprese2011}.\n\nWe say that a set $\\mathcal U$ of update actions is \\emph{closed} under $r$ if\n$\\mathsf{nup}(r)\\subseteq\\mathsf{lit}(\\mathcal U)$ implies $\\head r\\cap\\mathcal U\\neq\\emptyset$, and it is\nclosed under a set $\\eta$ of AICs if it is closed under every closed instance of\nevery rule in $\\eta$.\nIn particular, every founded weak repair for $\\langle\\mathcal I,\\eta\\rangle$ is by definition\nclosed under~$\\eta$.\n\nA closed update action $+a$ (resp.\\ $-a$) is a \\emph{no-effect} action w.r.t.\\\n$(\\I,\\I\\circ\\mathcal U)$ if $a\\in\\I\\cap(\\I\\circ\\mathcal U)$\n(resp.\\ $a\\notin\\I\\cup(\\I\\circ\\mathcal U)$).\nThe set of all no-effect actions w.r.t.\\ $(\\I,\\I\\circ\\mathcal U)$ is denoted by\n$\\neff{\\U}$.\nA set of update actions $\\mathcal U$ is a justified action set if it coincides with the\nset of update actions forced by the set of AICs and the database before and\nafter applying $\\mathcal U$~\\cite{Caroprese2011}.\n\n\\begin{definition}\n Let $\\I$ be a database and $\\eta$ a set of AICs.\n A consistent set $\\mathcal U$ of update actions is a \\emph{justified action set} for\n $\\langle\\mathcal I,\\eta\\rangle$ if it is a minimal set of update actions containing $\\neff{\\U}$ and\n closed under $\\eta$.\n If $\\mathcal U$ is a justified action set for $\\langle\\mathcal I,\\eta\\rangle$, then $\\mathcal U\\setminus\\neff{\\U}$ is a\n justified weak repair for $\\langle\\mathcal I,\\eta\\rangle$.\n\\end{definition}\nIn particular, it has been shown that justified repairs are always\nfounded~\\cite{Caroprese2011}.\nThe problem of deciding whether there exist justified weak repairs or justified repairs\nfor $\\langle\\mathcal I,\\eta\\rangle$ is again a\n$\\Sigma^P_2$-complete problem, becoming $NP$-complete if one restricts the AICs\nto contain only one action in their head (\\emph{normal} AICs).\n\n\\subsection{Operational Semantics}\n\nThe declarative semantics of AICs is not very satisfactory, as it does not\ncapture the operational nature of rules.\nIn particular, the quantification over all no-effect actions in the definition\nof justified action set poses a practical problem.\nTherefore, an operational semantics for AICs was proposed in~\\cite{CEGN2013},\nwhich we now summarize.\n\n\\begin{definition}\n Let $\\I$ be a database and $\\eta$ be a set of AICs.\n \\begin{itemize}\n \\item The \\emph{repair tree} for $\\langle\\mathcal I,\\eta\\rangle$, $T_{\\langle\\mathcal I,\\eta\\rangle}$, is a labeled tree\n where: nodes are sets of update actions; each edge is labeled with a closed\n instance of a rule in $\\eta$;\n the root is $\\emptyset$; and for each consistent node $n$ and closed\n instance $r$ of a rule in $\\eta$, if $\\I\\circ n\\not\\models r$ then for each\n $L\\in\\body{r}$ the set $n'=n\\cup\\left\\{\\mathsf{ua}(L)^D\\right\\}$ is a child of $n$,\n with the edge from $n$ to $n'$ labeled by $r$.\n \\item The \\emph{founded repair tree} for $\\langle\\mathcal I,\\eta\\rangle$, $T^f_{\\langle\\mathcal I,\\eta\\rangle}$, is\n constructed as $T_{\\langle\\mathcal I,\\eta\\rangle}$ but requiring that $\\mathsf{ua}(L)$ occur in the head of\n some closed instance of a rule in $\\eta$.\n \\item The \\emph{well-founded repair tree} for $\\langle\\mathcal I,\\eta\\rangle$, $T^{wf}_{\\langle\\mathcal I,\\eta\\rangle}$, is\n also constructed as $T_{\\langle\\mathcal I,\\eta\\rangle}$ but requiring that $\\mathsf{ua}(L)$ occur in the\n head of the rule being applied.\n \\item The \\emph{justified repair tree} for $\\langle\\mathcal I,\\eta\\rangle$, $T^j_{\\langle\\mathcal I,\\eta\\rangle}$, has nodes\n that are \\emph{pairs} of sets of update actions $\\langle\\mathcal U,\\mathcal J\\rangle$, with\n root $\\langle\\emptyset,\\emptyset\\rangle$.\n For each node $n$ and closed instance $r$ of a rule in $\\eta$, if\n $\\I\\circ\\mathcal U_n\\not\\models r$, then for each $\\alpha\\in\\head{r}$ there is a\n descendant $n'$ of $n$, with the edge from $n$ to $n'$ labeled by $r$,\n where:\n $\\mathcal U_{n'} = \\mathcal U_n\\cup\\left\\{\\alpha\\right\\}$;\n and $\\mathcal J_{n'} = \\left(\\mathcal J_n\\cup\\{\\mathsf{ua}(\\mathsf{nup}(r))\\}\\right)\\setminus\\mathcal U_n$.\n \\end{itemize}\n\\end{definition}\n\nThe properties of repair trees are summarized in the following results, proved\nin~\\cite{CEGN2013}.\n\\begin{theorem}\n \\label{thm:trees}\n Let $\\I$ be a database and $\\eta$ be a set of AICs. Then:\n \\begin{enumerate}\n \\item $T_{\\langle\\mathcal I,\\eta\\rangle}$ is finite.\n \\item Every consistent leaf of $T_{\\langle\\mathcal I,\\eta\\rangle}$ is labeled by a weak repair for $\\langle\\mathcal I,\\eta\\rangle$.\n \\item If $\\mathcal U$ is a repair for $\\langle\\mathcal I,\\eta\\rangle$, then there is a branch of $T_{\\langle\\mathcal I,\\eta\\rangle}$\n ending with a leaf labeled by $\\mathcal U$.\n \\item If $\\mathcal U$ is a founded repair for $\\langle\\mathcal I,\\eta\\rangle$, then there\n is a branch of $T^f_{\\langle\\mathcal I,\\eta\\rangle}$ ending with a leaf\n labeled by $\\mathcal U$.\n \\item If $\\mathcal U$ is a justified repair for $\\langle\\mathcal I,\\eta\\rangle$, then there\n is a branch of $T^j_{\\langle\\mathcal I,\\eta\\rangle}$ ending with a leaf\n labeled by $\\mathcal U$.\n \\item If $\\eta$ is a set of normal AICs and $\\langle\\mathcal U,\\mathcal J\\rangle$ is a leaf of\n $T^j_{\\langle\\mathcal I,\\eta\\rangle}$ with $\\mathcal U$ consistent and $\\mathcal U\\cap\\mathcal J=\\emptyset$, then $\\mathcal U$ is a\n justified repair for $\\langle\\mathcal I,\\eta\\rangle$.\n \\end{enumerate}\n\\end{theorem}\nNot all leaves will correspond to repairs of the desired kind; in particular,\nthere may be weak repairs in repair trees.\nAlso, both $T^f_{\\langle\\mathcal I,\\eta\\rangle}$ and $T^j_{\\langle\\mathcal I,\\eta\\rangle}$ typically contain leaves that do not\ncorrespond to founded or justified (weak) repairs -- otherwise the problem of\ndeciding whether there exists a founded or justified weak repair for $\\langle\\mathcal I,\\eta\\rangle$\nwould be solvable in non-deterministic polynomial time.\nThe leaves of the well-founded repair tree for $\\langle\\mathcal I,\\eta\\rangle$ correspond to a new type of weak repairs,\ncalled \\emph{well-founded weak repairs}, not\nconsidered in the original works on AICs.\n\n\\subsection{Parallel Computation of Repairs}\n\\label{ssec:par}\n\nThe computation of founded or justified repairs can be improved by dividing the\nset of AICs into independent sets that can be processed\nindependently, simply merging the computed repairs at the end~\\cite{lcf:14}.\nHere, we adapt the definitions given therein to the first-order scenario.\nTwo sets of AICs $\\eta_1$ and $\\eta_2$ are independent if the same atom does not\noccur in a literal in the body of a closed instance of two distinct rules\n$r_1\\in\\eta_1$ and $r_2\\in\\eta_2$.\nIf $\\eta_1$ and $\\eta_2$ are independent, then repairs for\n$\\langle I,\\eta_1\\cup\\eta_2\\rangle$ are exactly the unions of a repair for\n$\\langle\\I,\\eta_1\\rangle$ and $\\langle\\I,\\eta_2\\rangle$; furthermore,\nthe result still holds if one considers founded, well-founded or\njustified repairs.\n\nIf an atom occurs in a literal in the body of a closed instance of a rule in\n$\\eta_2$ and in an action in the head of a closed instance of a rule in\n$\\eta_1$, but not conversely, then we say that $\\eta_1$ \\emph{precedes}\n$\\eta_2$.\nFounded\/justified (but not well-founded) repairs for $\\eta_1\\cup\\eta_2$ can be\ncomputed in a stratified way, by first repairing $\\I$ w.r.t.~$\\eta_1$, and then\nrepairing the result w.r.t.~$\\eta_2$.\n\nSplitting a set of AICs into independent sets or stratifying it can be solved\nusing standard algorithms on graphs, as we describe in\nSection~\\ref{sec:parallel}.\n\n\\section{\\uppercase{The tool}}\n\\label{sec:tool}\n\n\\noindent\nThe tool \\texttt{repAIrC}\\ is implemented in Java, and its simplified UML class diagram can\nbe seen in Figure~\\ref{fig:classes}.\nStructurally, this tool can be split into four main separate components,\ncentered on the four classes marked in bold in that figure.\n\\begin{itemize}\n\\item Objects of type \\class{AIC} implement active integrity constraints.\n\\item Implementations of interface \\class{DB} provide the necessary tools to\n interact with a particular database management system; currently, we provide\n functionality for SQL databases supported by JDBC.\n\\item Objects of type \\class{RepairTree} correspond to concrete repair trees;\n their exact type will be the subclass corresponding to a particular kind of\n repairs.\n\\item Class \\class{RunRepairGUI} provides the graphical interface to interact\n with the user.\n\\end{itemize}\n\n\\begin{figure*}[!ht]\n \\centering\n \\scriptsize\\input{class.pdf_tex}\n \\caption{Class diagram for \\texttt{repAIrC}.}\n \\label{fig:classes}\n\\end{figure*}\n\nAn important design aspect has to do with extensibility and modularity.\nA first prototype focused on the construction of repair trees, and used simple\ntext files to mimick databases as lists of propositional atoms, in the style\nof~\\cite{Caroprese2011,CEGN2013}.\nLater, parallelization capabilities were added (as explained in\nSection~\\ref{sec:parallel}), requiring changes only to \\class{RepairController}\n-- the class that controls the execution of the whole process.\nLikewise, the extension of \\texttt{repAIrC}\\ to SQL databases and the addition of the\nstratification mechanism only required localized changes in the classes directly\nconcerned with those processes.\n\nThe next subsections detail the implementation of the classes \\class{AIC}, \\class{DB},\n\\class{RepairTree} and \\class{RunRepairTreeGUI}.\n\n\\subsection{Representing Active Integrity Constraints}\n\n\\noindent\nIn the practical setting, it makes sense to diverge a little from the\ntheoretical definition of AICs.\n\\begin{itemize}\n\\item Real-world tables found in DBs contain many columns, most of which are typically irrelevant for a given integrity constraint.\n\\item The columns of a table are not static, i.e., columns are usually added or removed during a database's lifecycle.\n\\item The order of columns in a table should not matter, as they are identified by a unique column name.\n\\end{itemize}\nTo deal pragmatically with these three aspects, we will write atoms using a more database-oriented notation, allowing\nthe arguments to be provided in any order, but requiring that the column names\nbe provided.\nThe special token \\verb+$+ is used as first character of a variable.\nSo, for example, the literal \\verb+hasInsurance(firstName=$X, type='basic')+\nwill match any entry in table \\verb+hasInsurance+ having value \\verb+basic+ in\ncolumn \\verb+type+ and any value in column \\verb+firstName+; this table may\nadditionally have other columns.\nNegative literals are preceded by the keyword \\verb+NOT+, while actions must\nbegin with \\verb-+- or \\verb+-+.\nLiterals and actions are separated by commas, and the body and head of an AIC\nare separated by \\verb+->+.\nThe AIC is finished when \\verb+;+ is encountered, thus allowing constraints to\nspan several lines.\n\nAICs are provided in a text file, which is parsed by a parser generated\nautomatically using JavaCC and transformed into objects of type \\class{AIC}.\nThese contain a body and a head, which are respectively\n\\class{List} and \\class{List};\nfor consistency with the underlying theory, \\class{Literal} and \\class{Action}\nare implemented separately, although their objects are isomorphic:\nthey contain an object of type \\class{Clause} (which consists of the\nname of a table in the database and a list of pairs column name\/value)\nand a flag indicating whether they are positive\/negated (literals) or additions\/removals\n(actions).\n\n\\begin{example}\n\\label{ex:AIC1}\nConsider the following active integrity constraints for an employee database.\nThe first states\nthat the boss (as specified in the \\textnormal{\\sf category} table) cannot be a junior employee (i.e., have an entry in the \\textnormal{\\sf junior} table);\nthe second states that every junior employee must have some basic insurance (as specified in the \\textnormal{\\sf insured} table).\n\\[\n \\mathsf{junior}(X), \\mathsf{category}(\\mathsf{boss},X) \\supset\n -\\mathsf{junior}(X)\n\\]\n\\begin{multline*}\n \\label{AICex2}\n \\mathsf{junior}(X), \\mathsf{not\\ insured}(X,\\mathsf{basic})\n \\\\ \\supset +\\mathsf{insured}(X,\\mathsf{basic})\n\\end{multline*}\n\nThese are written in the concrete text-based syntax of the \\texttt{repAIrC}\\ tool as\n{\\small\n\\begin{verbatim}\njunior(id = $X),\n category(type = boss, empId = $X)\n -> - junior(id = $X);\n\njunior(id = $X),\n NOT insured(empId = $X, type = basic)\n -> + insured(empId = $X, type = basic);\n\\end{verbatim}}\n\\noindent respectively, assuming the corresponding column names for\nthe atributes.\nNote that, thanks to our usage of explicit column naming, the column names for the same variable need not have\nidentical designations.\n\\end{example}\n\n\\subsection{Interfacing with the Database}\n\\label{ssec:interface}\n\nDatabase operations (queries and updates) are defined in the\n\\class{DB} interface, which contains the following methods.\n\\begin{itemize}\n\\item \\verb+getUpdateActions(AIC aic)+: queries the database for all the instances\n of \\verb+aic+ that are not satisfied in its current state, returning a\n \\verb+Collection>+ that contains the corresponding\n instantiations of the head of \\verb+aic+.\n\\item \\verb+update(Collection actions)+: applies all update actions in\n \\verb+actions+ to the database (void).\n\\item \\verb+undo(Collection actions)+: undoes the effect of all update\n actions in \\verb+actions+ (void).\n\\item \\verb+aicsCompatible(Collection aics)+: checks that all the elements of\n \\verb+aics+ are compatible with the structure of the database.\n\\item \\verb+disconnect()+: disconnects from the database (void). The\n connection is established when the object is originally constructed.\n\\end{itemize}\n\nSome of these methods require more detailed comments.\nThe construction of the repair tree also requires that the database be changed\ninteractively, but upon conclusion the database should be returned to its\noriginal state.\nIn theory, this would be achievable by applying the \\verb+update+ method with\nthe duals of the actions that were used to change the database; but this turns\nout not to be the case for deletion actions.\nSince the AICs may underspecify the entries in the database (because some fields\nare left implicit), the implementation of \\verb+update+ must take care to\nstore the values of all rows that are deleted from the database.\nIn turn, the \\verb+undo+ method will read this information every time it has to\nundo a deletion action, in order to find out exactly what entries to re-add.\n\nThe method \\verb+aicsCompatible+ is necessary because the AICs are given\nindependently of the database, but they must be compatible with its structure --\notherwise, all queries will return errors.\nIncluding this method in the interface allows the AICs to be tested before any queries are made,\nthus significantly reducing the number of exceptions that can occur during\nprogram execution.\n\n\n\n\n\n \n\n\nCurrently, \\texttt{repAIrC}\\ includes an implementation \\verb+DBMySQL+ of \\verb+DB+, which\nworks with SQL databases.\nThe interaction between \\texttt{repAIrC}\\ and the database is achieved by means of JDBC, a\nJava database connectivity technology able to interface with nearly all existing\nSQL databases.\nIn order to determine whether an AIC is satisfied by a database, method\n\\verb+getUpdateActions+ first builds a single SQL query corresponding to the body of\nthe AIC.\nThis method builds two separate \\verb+SELECT+ statements, one for the positive\nand another for the negative literals in the body of the AIC.\nEach time a new variable is found, the table and column where it occurs are\nstored, so that future references to the same variable in a positive literal can\nbe unified by using inner joins.\nThe \\verb+select+ statement for the negative literals is then connected to the\nother one using a \\verb+WHERE NOT EXISTS+ condition.\nVariables in the negative literals must necessarily appear first in a positive\nliteral in the same AIC; therefore, they can then be connected by a \\verb+WHERE+\nclause instead of an inner join.\n\n\\begin{example}\nThe bodies of the integrity constraints in Example~\\ref{ex:AIC1} generate the\nfollowing SQL queries.\n{\\small\n\\begin{verbatim}\nSELECT * FROM junior\n INNER JOIN dept_emp\n ON junior.id=category.empId\n WHERE category.type=`boss'\n\nSELECT * FROM junior\n WHERE NOT EXISTS\n (SELECT * FROM insured\n WHERE insured.empId=junior.id\n AND insured.type=`basic')\n\\end{verbatim}}\n\\end{example}\n\n\\subsection{Implementing Repair Trees}\n\nThe implementation of the repair trees directly follows the algorithms described\nin Section~\\ref{sec:background}.\nDifferent types of repair trees are implemented using inheritance, so that most\nof the code can be reused in the more complex trees.\nThe trees are constructed in a breadth-first manner, and all non-contradictory\nleaves that are found are stored in a list.\nAt the end, this list is pruned so that only the minimal elements (w.r.t.~set\ninclusion) remain -- as these are the ones that correspond to repairs.\n\nWhile constructing the tree, the database has to be temporarily updated and\nrestored.\nIndeed, to calculate the descendants of a node, we first need to evaluate all\nAICs at that node in order to determine which ones are violated; this requires\nquerying a modified version of the database that takes into account the update\nactions in the current node.\n\nIn order to avoid concurrency issues, these updates are performed in a transaction-style way,\nwhere we update the database, perform the necessary SQL queries, and rollback to\nthe original state, guaranteeing that other threads interacting with the\ndatabase during this process neither see the modifications nor lead to inconsistent repair trees.\nThis becomes of particular interest when the parallel processing tools described\nin Section~\\ref{sec:parallel} are put into place.\nAlthough this adds some overhead to the execution time,\nat the end of that section we discuss why scalability is not a practically relevant concern.\n\nAfter finding all the leaves of the repair tree, a further step is needed in the\ncase one is looking for founded or justified repairs, as the corresponding trees\nmay contain leaves that do not correspond to repairs with the desired property.\nThis step is skipped if all AICs are normal, in view of the results\nfrom~\\cite{CEGN2013}.\nFor founded repairs, we directly apply the definition: for each action $\\alpha$,\ncheck that there is an AIC with $\\alpha$ in its head and such that all other\nliterals in its body are satisfied by the database.\n\nFor justified repairs, the validation step is less obvious.\nDirectly following the definition requires constructing the set of\nno-effect actions, which is essentially as large as the database, and iterating\nover subsets of this set.\nThis is obviously not possible to do in practical settings.\nTherefore, we use some criteria to simplify this step.\n\n\\begin{lemma}\n If a rule $r$ was not applied in the branch leading to $\\mathcal U$, then $\\mathcal U$ is\n closed under $r$.\n\\end{lemma}\n\\begin{proof}\n Suppose that $r$ was never applied and assume $\\mathsf{nup}(r)\\subseteq\\neff\\mathcal U$.\n Then necessarily $\\head r\\cap\\neff\\mathcal U\\neq\\emptyset$, otherwise $r$ would be\n applicable and $\\mathcal U$ would not be a repair.\n\\end{proof}\n\nBy construction, $\\mathcal U$ is also closed for all rules applied in the branch leading\nto it.\n\nLet $\\mathcal U$ be a candidate justified weak repair.\nIn order to test it, we need to show that $\\mathcal U\\cup\\neff\\mathcal U$ is a justified\naction set (see~\\cite{CEGN2013}), which requires iterating over all subsets of\n$\\mathcal U\\cup\\neff\\mathcal U$ that contain $\\neff\\mathcal U$.\nClearly this can be achieved by iterating over subsets of $\\mathcal U$.\n\nBut if $\\mathcal U^\\ast\\subseteq \\mathcal U$, then $\\mathsf{nup}(r)\\cap \\mathcal U^\\ast=\\emptyset$; this\nallows us to simplify the closedness condition to: if $\\mathsf{nup}(r)\\subseteq\\neff\\mathcal U$,\nthen $\\mathcal U^\\ast\\cap\\head r=\\emptyset$.\nThe antecedent needs then only be done once (since it only depends on $\\mathcal U$),\nwhereas the consequent does not require consulting the database.\n\nThe following result summarizes these properties.\n\\begin{lemma}\n A weak repair $\\mathcal U$ in a leaf of the justified repair tree for $\\langle\\mathcal I,\\eta\\rangle$ is a\n justified weak repair for $\\langle\\mathcal I,\\eta\\rangle$ iff, for every set $\\mathcal U^\\ast\\subseteq\\mathcal U$, \n if $\\mathsf{nup}(r)\\subseteq\\neff\\mathcal U$, then $\\mathcal U^\\ast\\cap\\head r=\\emptyset$.\n\\end{lemma}\n\nThe different implementations of repair trees use different subclasses of the\nabstract class \\verb+Node+; in particular, nodes of \\verb+JustifiedRepairTree+s\nmust keep track not only of the sets of update actions being constructed, but\nalso of the sets of non-updatable actions that were assumed.\nThese labels are stored as \\verb+Set+ using \\verb+HashSet+ from the\nJava library as implementation, as they are repeatedly tested\nfor membership everytime a new node is generated.\n\nFor efficiency, repair trees maintain internally a set of the sets of update\nactions that label nodes constructed so far as a \\verb+Set+.\nThis is used to avoid generating duplicate nodes with the same label.\nSince this set is used mainly for querying, it is again implemented as a\n\\verb+HashSet+.\nNodes with inconsistent labels are also immediately eliminated, since they can\nonly produce inconsistent leaves.\n\n\\subsection{Interfacing with the User}\n\n\\begin{figure}[b]\n \\centering\n \\resizebox{.9\\columnwidth}!{\\includegraphics{scrshot3.png}}\n \\caption{The initial screen for \\texttt{repAIrC}.}\n \\label{fig:menu}\n\\end{figure}\n\n\\noindent\nThe user interface for \\texttt{repAIrC}\\ is implemented using the standard Java GUI widget\ntoolkit \\verb+Swing+, and is rather straightforward.\nOn startup, the user is presented with the dialog box depicted in\nFigure~\\ref{fig:menu}.\n\nThe user can then provide credentials to connect to a database, as well as enter\na file containing a set of AICs.\nIf the connection to the database is successful and the file is successfully\nparsed, \\texttt{repAIrC}\\ invokes the \\verb+aicsCompatible+ method required by the\nimplementation of the \\verb+DB+ interface (see Section~\\ref{ssec:interface}) and\nverifies that all tables and columns mentioned in the set of AICs are valid\ntables and columns in the database.\nIf this is not the case, then an error message is generated and the user is\nrequired to select new files; otherwise, the buttons for configuration and\ncomputation of repairs become active.\n\nOnce the initialization has succeeded, one can check the database for\nconsistency and obtain different types of repairs, computed using the repair\ntree described above.\nAs it may be of interest to obtain also weak repairs, the user is given the\npossibility of selecting whether to\nsee only the repairs computed, or all valid leaves of the repair tree -- which\ntypically include some weak repairs.\nIn both cases the necessary validations are performed, so that leaves that do not\ncorrespond to repairs (in the case of founded or justified repairs) are never\npresented.\n\nAn example output screen after successful computation of the repairs for an\ninconsistent database can be seen in Figure~\\ref{fig:output}.\n\n\\begin{figure}[b]\n \\centering\n \\resizebox{.9\\columnwidth}!{\\includegraphics{scrshot2.png}}\n \\caption{Possible repairs of an inconsistent database.}\n \\label{fig:output}\n\\end{figure}\n\n\\section{\\uppercase{Parallelization and Stratification}}\n\\label{sec:parallel}\n\nAs described in Section~\\ref{ssec:par}, it is possible to parallelize the search for\nrepairs of different kinds by splitting the set of AICs into independent sets;\nin the case of founded or justified repairs, this parallelization can be taken\none step further by also stratifying the set of AICs.\nEven though finding partitions and\/or stratifications is asymptotically not\nvery expensive (it can be solved in linear time by the well-known graph\nalgorithms described below), it may still take noticeable time if the set of\nAICs grows very large.\n\nSince, by definition, partitions and stratifications are independent of the\nactual database, it makes sense to avoid repeating their computation unless the\nset of AICs changes.\nFor this reason, parallelization capabilities are implemented in \\texttt{repAIrC}\\ in a\ntwo-stage process.\nInside \\texttt{repAIrC}, the user can switch to the \\verb+Preprocess+ tab, which provides\noptions for computing partitions and stratifications of a set of AICs.\nThis results in an annotated file which still can be read by the parser; in the\nmain tab, parallel computation is automatically enabled whenever the input file\nis annotated in a proper manner.\n\n\\subsection{Implementation}\n\nComputing optimal partitions in the spirit of~\\cite{lcf:14} is not feasible in a\nsetting where variables are present, as this would require considering all\nclosed instances of all AICs -- but it is also not desirable, as it would also\nresult in a significant increase of the number of queries to the database.\nInstead, we work with the adapted definition of dependency given in\nSection~\\ref{sec:background}.\nGiven a set of AICs, \\texttt{repAIrC}\\ constructs the adjacency matrix for the undirected\ngraph whose nodes are AICs and such that there is an edge between $r_1$ to $r_2$\niff $r_1$ and $r_2$ are not independent.\nA partition is then computed simply by finding the connected components in this\ngraph by a standard graph algorithm.\n\nThe partitions computed are then written to a file, where each partition begins\nwith the line\n\\begin{verbatim}\n#PARTITION_BEGIN_[NO]#\n\\end{verbatim}\nwhere \\verb+[NO]+ is the number of the current partition, and ends with\n\\begin{verbatim}\n#PARTITION_END#\n\\end{verbatim}\nand the AICs in each partition are inserted in between, in the standard format.\n\nTo compute the partitions for stratification, we need to find the strongly connected components of a\nsimilar graph.\nThis is now a directed graph where there is an edge from $r_1$ to $r_2$ if $r_1$\nprecedes $r_2$.\nThe implementation is a variant of Tarjan's algorithm~\\cite{Tarjan72}, adapted to\ngive also the dependencies between the connected components.\n\nThe computed stratification is then written to a file with a similar syntax to\nthe previous one, to which a dependency section is added, between the special\ndelimiters\n\\begin{verbatim}\n#DEPENDENCIES_BEGIN#\n\\end{verbatim}\nand\n\\begin{verbatim}\n#DEPENDENCIES_END#\n\\end{verbatim}\n\\noindent The dependencies are included in this section as a sequence of strings\n\\verb+X -> Y+, one per line, where \\verb+X+ and \\verb+Y+ are the numbers of two\npartitions\nand \\verb+Y+ precedes \\verb+X+.\n\n\\begin{example}\n\\label{ex:strat}\n The two AICs from Example~\\ref{ex:AIC1} cannot be parallelized, as they both\n use the \\verb+junior+ table, but they can be stratified, as only the first one\n makes changes to this table.\n Preprocessing this example by \\texttt{repAIrC}\\ would return the following output.\n\n{\\small\n\\begin{verbatim}\n#PARTITION_BEGIN_1#\njunior(id = $X),\n category(type = boss, empId = $X)\n -> - junior(id = $X);\n#PARTITION_END#\n#PARTITION_BEGIN_2#\njunior(id = $X),\n NOT insured(empId = $X, type = basic)\n -> + insured(empId = $X, type = basic);\n#PARTITION_END#\n#DEPENDENCIES_BEGIN#\n2 -> 1\n#DEPENDENCIES_END#\n\\end{verbatim}}\n\nImagine a simple scenario where the \\verb+junior+ table contains a single entry.\nThen, computing repairs for this set of AICs can be achieved by first repairing\npartition $1$ (which will generate a tree with only one node) and then repairing\nthe resulting database w.r.t.~partition $2$ (which builds another tree, also\nwith only one node).\nBy comparison, processing the two AICs simultaneously would potentially give a\ntree with $4$ nodes, as both AICs would have to be considered at each stage.\n\\end{example}\n\nIn general, if there are $n$ entries in the \\verb+junior+ table, the stratified\napproach will construct at most $n+1$ trees with a total of $n^2+n$ nodes (one\ntree with $n$ nodes for the first AIC, at most $n$ trees with at most $n$ nodes\nfor the second AIC).\nBy contrast, processing both AICs together will construct a tree with\npotentially $(2n)!$ leaves, which by removing duplicate nodes may still contain\n$2^{2n}$ nodes.\n\nThis example shows that, by stratifying AICs, we can actually get an exponential\ndecrease on the size of the repair trees being built -- and therefore also on\nthe total runtime.\n\nIn addition to alleviating the exponential blowup of the repair trees, parallelization\nand stratification also allow for a multi-threaded implementation, where repair trees\nare built in parallel in multiple concurrent threads. To ensure that the dependencies between the\npartitions are respected, the threads are instructed to wait for other threads that compute preceding\npartitions. In Example~\\ref{ex:strat}, the thread processing partition 2 would be instructed\nto first wait for the thread processing partition 1 to finish.\n\nOur empirical evaluation of \\texttt{repAIrC}\\ showed that speedups of a factor of $4$ to $7$\nwere observable even when processing small\nparallelizable sets of only two or three AICs. For larger sets of AICs,\nparallelization and stratification are necessary to obtain feasible runtimes. In one application,\nwhich allowed for $15$ partitions to be processed independently, the stratified version computed\nthe founded repairs in approximately $1$ second, whereas the sequential version did not terminate\nwithin a time limit of $15000$ seconds. This corresponds to a speedup of at least four orders of magnitude,\ndemonstrating the practical impact of the contributions of this section.\n\n\\subsection{Practical Assessment}\n\nIn the worst case, parallelization and stratification will have no impact on the\nconstruction of the repair tree, as it is possible to construct a set of AICs\nwith no independent subsets.\nHowever, the worst case is not the general case, and it is reasonable to believe\nthat real-life sets of AICs will actually have a high parallelization potential.\n\nIndeed, integrity constraints typically reflect high-level consistency\nrequirements of the database, which in turn capture the hierarchical nature of\nrelational databases, where more complex relations are built from simpler ones.\nThus, when specifying \\emph{active} integrity constraints there will naturally\nbe a preference to correct inconsistencies by updating the more complex tables\nrather than the most primitive ones.\n\nFurthermore, in a real setting we are not so much interested in repairing a\ndatabase once, but rather in ensuring that it remains consistent as its\ninformation changes.\nTherefore, it is likely that inconsistencies that arise will be localized to a\nparticular table.\nThe ability to process independent sets of AICs separately guarantees that we\nwill not be repeatedly evaluating those constraints that were not broken by\nrecent changes, focusing only on the constraints that can actually become\nunsatisfied as we attempt to fix the inconsistency.\n\nFor the same reason, scalability of the techniques we implemented is not a relevant issue:\nthere is no practical need to develop a tool that is able to fix hundreds of inconsistencies\nefficiently simultaneously, since each change to the database will likely only impact a few AICs.\n\n\\section{\\uppercase{Conclusions and Future Work}}\n\\label{sec:concl}\n\n\\noindent\nWe presented a working prototype of a tool, called \\texttt{repAIrC}, to check integrity of\nreal-world SQL databases with respect to a given set of\nactive integrity constraints, and to compute different\ntypes of repairs automatically in case inconsistency is detected, following the ideas and algorithms\nin~\\cite{Flesca2004,Caroprese2007,Caroprese2011,CEGN2013,lcf:14}.\nThis tool is the first implementation of a concept we believe to have\nthe potential to be integrated in current database management systems.\n\nOur tool currently does not automatically apply repairs to the database, rather presenting them to the user.\nAs discussed in \\cite{Eiter1992}, such a functionality is not likely to be obtainable, as human intervention in the process of database repair is generally accepted to be necessary.\nThat said, automating the generation of a small and relevant set of repairs is a first important step in\nensuring a consistent data basis in Knowledge Management.\n\nIn order to deal with real-world heterogenous knowledge management systems, we\nare currently working on extending and generalizing the notion of (active)\nintegrity constraints to encompass more complex knowledge repositories such as\nontologies, expert reasoning systems, and distributed knowledge bases.\nThe design of \\texttt{repAIrC}\\ has been with this extension in mind, and we believe that\nits modularity will allow us to generalize it to work with such knowledge\nmanagement systems once the right theoretical framework is developed.\n\nOn the technical side, we are planning to speed up the system by integrating a local\ndatabase cache for peforming the many update and undo actions during exploration\nof the repair trees without the overhead of an external database connection.\n\n\\section*{\\uppercase{Acknowledgments}}\n\nThis work was supported by the Danish Council for Independent Research, Natural Sciences, and by FCT\/MCTES\/PIDDAC under centre grant to BioISI (Centre Reference: UID\/MULTI\/04046\/2013).\nMarta Ludovico was sponsored by a grant ``Bolsa Universidade de Lisboa \/ Funda\\c c\\~ao Amadeu Dias''.\n\n\\vfill\n\\bibliographystyle{apalike}\n{\\small\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\nThe use of non-polynomial basis functions in the context of finite element methods dates back at least to the early 1980s \\cite{MR806382}.\nIn recent years, there has been much interest in using non-polynomial basis functions to discretize wave propagation problems in the frequency domain \\cite{CesD98,MoiHP}.\nA prominent example is the use of plane wave bases to solve the Helmholtz equation at high frequencies. The motivation behind this approach is to reduce the number of degrees of freedom per wavelength required to obtain accurate results. Thus obtained Trefftz methods have proved very successful in practice, hence it is a natural question to ask whether they can be extended and whether they can be equally successful in the time-domain. \n\nThe most natural way of including space-time Trefftz basis functions is within the confines of a space-time discontinuous Galerkin (dG) method. \nIn this work, we construct and analyse a new space-time interior penalty dG method for the second order wave equation, that can utilize Trefftz polynomials as local basis functions. The method discretizes the wave equation in primal form and is defined using space-time slabs to ensure solvability on each time-step, as well as to aid the presentation and the analysis. However, with minor modifications, completely unstructured space-time meshes are, in principle, possible in the proposed space-time dG framework. This results in a stable, dissipative scheme for general polynomial bases. For Trefftz basis, we prove quasi-optimality in the dG energy norm, which we show to be an upper bound for a standard space-time energy norm. Numerical results in the dG norm show that the \\reply{theoretical estimates of the convergence order are optimal}. Furthermore, the numerical results show that higher order schemes have excellent energy conservation properties and work well for systems with energy at high frequencies. Comparison with standard polynomial bases show that the same convergence order and approximation properties is obtained with considerably fewer degrees of freedom. Furthermore, the implementation is less expensive due to integration being restricted to the space-time skeleton.\n\n\n\n\nSpace-time variational methods for wave-type problems have appeared in the late 1980's with the works of Hughes and Hulbert \\cite{HulH88,HulH90} and Johnson \\cite{Joh93}.\nFirst numerical experiments with Trefftz space-time dG methods were performed in \\cite{PetFT}. Currently there is significant activity on the topic \\cite{Egger1,KreMPS,Egger2,moiola_proc,KreSTW}. \\reply{ In particular in \\cite{Egger1,KreMPS} a Trefftz space-time local dG method for the Maxwell equations, written as a first order system, resulting in a two-field formulation, has been analysed. The dG method designed and analyzed in the present work involves interior-penalty-type numerical fluxes in space, resulting in one-field approximation in space, as well as a one-field dG method in time, with very similar computational stencil widths compared to the local dG method introduced in \\cite{KreMPS}.}\n\n\n\nTypically, finite element methods for linear (and some spatially nonlinear) wave problems are based on a continuous or discontinuous finite element discretisation of the spatial variables complemented with standard time-stepping schemes, the most popular of which are explicit, such as the leap-frog scheme, due to the acceptable CFL restrictions. Though even the low order methods can be conservative, for acceptable accuracy when energies at high frequencies are excited, higher order methods are essential \\cite{CohBook,AinMM,AguDE}. Compared to these methods, introduction of higher order approximations is much more straightforward in the context of space-time dG methods. \\reply{Moreover, space-time dG methods, such as the one presented below, do \\emph{not} require any CFL-type restrictions, owing to their implicit time-stepping interpretation.} If a general space-time mesh can be used, a judicious choice of the mesh can result in a quasi-explicit method where only small local systems need to be solved \\cite{FalR,MonR}.\n\nThe remainder of this work is structured as follows. In the next section, we introduce the model problem. In Sections~\\ref{sec:space} and \\ref{sec:method} we construct the space-time interior penalty method and we show its stability. We proceed in Section~\\ref{sec:Tspace} to analyse polynomial Trefftz spaces and prove quasi-optimality. Finally in Section~\\ref{apriori}, we prove convergence rates for the $d$-dimensional method in space, $d=1,2,3$; moreover, we also provide $hp$-version a priori bounds for $d=1$. A series of numerical experiments in Section \\ref{sec:numerics}, illustrates the theoretical findings and highlights the good performance of the proposed method in practice.\n\n\n\n\n\\section{Model problem}\\label{sec:model}\n\nWe consider the wave equation\n\\begin{equation}\n \\label{eq:wave} \n\\begin{aligned}\n \\ddot u -\\nabla \\cdot \\left(a\\, \\nabla u\\right) &= 0 & &\\text{in } \\Omega \\times [0,T], \\\\\n u &= 0 & &\\text{on } \\partial\\Omega \\times [0,T],\\\\\n u(x,0) = u_0(x), \\; \\dot u(x,0) &= v_0(x), & &\\text{in } \\Omega,\n\\end{aligned}\n\\end{equation}\nwhere $\\Omega$ is a bounded Lipschitz domain in $\\mathbb{R}^d$, $\\partial\\Omega$ its boundary and $0 < c_a < a(x) < C_a$ a piecewise constant function. If $\\Omega_j$ and $\\Omega_k$ are two subsets of $\\Omega$ with the boundary $\\Gamma_{jk}$ separating them and with $a \\equiv a_k$ in $\\Omega_k$ and $a \\equiv a_j$ in $\\Omega_j$, then if we denote by $u_j = u|_{\\Omega_j}$ and $u_k = u|_{\\Omega_k}$ we further have the transmission conditions\n \\begin{equation}\n \\label{eq:transmission}\nu_j = u_k, \\quad \na_j\\partial_{\\mathbf{n}} u_j = a_k\\partial_{\\mathbf{n}} u_k, \\qquad \\text{ on } \\Gamma_{jk}, \n \\end{equation}\nwhere $\\mathbf{n}$ is the exterior normal to $\\Omega_j$ (or $\\Omega_k$).\n\nWe denote by $L^p(\\Sigma)$, $1\\le p\\le +\\infty$, the standard Lebesgue spaces, $\\Sigma\\subset\\mathbb{R}^d$, $d \\in \\{ 2,3,4\\}$, with corresponding norms $\\|\\cdot\\|_{p,\\Sigma}$; the norm of $L^2(\\Sigma)$ will be denoted by $\\ltwo{\\cdot}{\\Sigma}$. Further, $( \\cdot,\\cdot )_{\\Sigma}$ denotes the standard $L^2$-inner product on $\\Sigma$; when the arguments are vectors of $L^2$-functions, the $L^2$-inner product is modified in the standard fashion. \nWe denote by $H^s(\\Sigma)$ the standard Hilbertian Sobolev space of index $s\\in\\mathbb{R}$ of real-valued functions defined on $\\Sigma\\subset\\mathbb{R}^d$; in particular $H^1_0(\\Sigma)$ signifies the space of functions in $H^1(\\Sigma)$ whose traces onto the boundary $\\partial\\Sigma$ vanish. For $1\\le p\\le +\\infty$, we denote the standard Bochner spaces by $L^p(0,T;X)$, with $X$ being a Banach space with norm $\\|\\cdot\\|_X$.\nFinally, we denote by $C(0,T;X)$ the space of continuous functions $v: [0,T]\\to X$ with norm $\\|v\\|_{C(0,T;X)}:=\\max_{0\\le t\\le T}\\|v(t)\\|_{X}<+\\infty$.\n\nLet $u_0 \\in H^1_0(\\Omega)$ and $v_0 \\in L^2(\\Omega)$, then \\eqref{eq:wave} has a unique (weak) solution $u$ with \n\\begin{equation}\n \\label{eq:smoothness}\nu \\in L^2([0,T]; H^1_0(\\Omega)), \\quad \n\\dot u \\in L^2([0,T]; L^2(\\Omega)), \\quad \n\\ddot u \\in L^2([0,T]; H^{-1}(\\Omega)), \n\\end{equation}\nsee \\cite[Theorem 8.1]{LioMI}. Furthermore, see \\cite[Theorem 8.2]{LioMI}, the solution is continuous in time with\n\\begin{equation}\n \\label{eq:smoothness1}\nu \\in C([0,T]; H^1_0(\\Omega)), \\quad \n\\dot u \\in C([0,T]; L^2(\\Omega)).\n\\end{equation}\n\\our{We denote the space of all solutions by\n\\begin{equation}\n \\label{eq:soln_space}\n \\mathcal{X} = \\left\\{ u \\;|\\; u \\text{ weak solution of \\eqref{eq:wave} with } u_0 \\in H^1_0(\\Omega), v_0 \\in L^2(\\Omega)\\right\\}.\n\\end{equation}}\n\n\\section{Space-time finite element space}\\label{sec:space}\nWe aim to discretize this problem by a new space-time interior penalty discontinuous Galerkin method. In principle, this could be done on a general space-time mesh, however for the simplicity of presentation (and implementation) we construct a time discretization $0 = t_0 < t_1 < \\dots 0$ such that\n\\begin{equation}\n \\label{eq:mesh_reg}\n\\diam(K)\/\\rho_K \\leq c_{\\mathcal T}, \\qquad \\forall K \\in \\mathcal{T}_n, \\; n = 0,1,\\dots, N-1,\n\\end{equation}\nwhere $\\rho_K$ is the radius of the inscribed circle of $K$.\n\n\\our{For simplicity of the presentation \\emph{only} of the a priori error bounds below, we shall later make a shape-regularity assumption on the space-time mesh (cf., Assumption \\ref{as:st_reg}). We stress, however, that the stability results presented below do not depend on Assumption \\ref{as:st_reg} and, therefore, the numerical method proposed below is unconditionally stable for any choice of spatial and temporal meshsizes. Indeed, an important advantage in using such space-time methods is that they do \\emph{not} require any CFL-type restrictions.}\n\n\n\nFinally, the broken spatial gradient will be denoted by $\\nabla_n v$, given by $(\\nabla_n v)|_K:= (\\nabla v)|_K$ for all $K\\in\\mathcal{T}_n$ and a $v\\in C(I_n;H^1_0(\\Omega))+\\dspace{p}$; collectively, we shall denote the broken gradient by $\\widetilde{\\nabla} v$ defined as\n$(\\widetilde{\\nabla} v)|_{\\Omega\\times I_n}:= (\\nabla_n v)|_{\\Omega\\times I_n}$, $n=0,\\dots,N-1,$\nfor $v\\in C(\\prod_{n=0}^{N-1}\\mathring{I}_n;H^1_0(\\Omega))+\\dspaceT{p}$, i.e., $v$ is allowed to be discontinuous both in space and in time.\n\n\n\n\\section{A space-time discontinuous Galerkin method}\\label{sec:method}\nTo derive the weak form suitable for dG discretisation we will follow an energy argument. We start by assuming that $u$ is a smooth enough solution of \\eqref{eq:wave} and let $v \\in \\mathcal{X} + \\dspaceT{p}$. The standard symmetric interior penalty dG weak formulation on the time-slab $I_n$ when tested with $\\dot v$ is given by\n\\begin{equation}\\label{weak_IP_one}\n\\begin{split}\n (\\ddot u,\\dot v)_{\\Omega \\times I_n} &+ (a \\widetilde{\\nabla} u,\\widetilde{\\nabla} \\dot v)_{\\Omega \\times I_n}\n- (\\sa{a \\nabla u}, \\sj{\\dot v})_{\\Gamma_n \\times I_n}\\\\ \n&- (\\sj{u},\\sa{a \\nabla \\dot v})_{\\Gamma_n \\times I_n}+( \\sigma_0 \\sj{u} , \\sj{\\dot v} )_{\\Gamma_n \\times I_n} = 0,\n\\end{split}\n\\end{equation}\nwhere \n\\begin{equation}\n \\label{eq:sigma_defn}\n\\sigma_0(x,t) = C_{\\sigma_0} p^2(h(x,t))^{-1} ,\n\\end{equation}\nfor a positive constant $C_{\\sigma_0}$ to be made precise later.\nThis motivates the following definition of \\emph{discrete energy} $E_h(t,v)$ at time $t \\in I_n$, for \\reply{$v\\in \\mathcal{X} + \\dspaceT{p}$}:\n\\[\nE_h(t,v) := \\tfrac12\\|\\dot v(t)\\|^2_{\\Omega}+\\tfrac12\\|\\sqrt{a}\\widetilde{\\nabla} v(t)\\|^2_{\\Omega}\n+\\tfrac12\\|\\sqrt{\\sigma_0}\\sj{v(t)}\\|^2_{\\Gamma_n}-\\lip{\\sa{a \\nabla v(t)}}{ \\sj{ v(t)}}{\\Gamma_n}.\n\\]\nUsing the classical inverse inequality\n$\n \\|v\\|^2_{\\partial K} \\leq C_{\\text{inv}} p^2 |\\partial K|\/|K| \\|v\\|^2_K$, for all $ v \\in \\mathcal{P}^p(K)$, (see, e.g., \\cite{PieE,SchwabBook},) we see that\n\\[\n\\begin{split} \n2\\int_{\\Gamma_n} |\\sa{a \\nabla v(t,\\reply{s})}|^2 ds &\\leq C_a^2 \\sum_{K \\in \\mathcal{T}_n} \\int_{\\partial K} |\\nabla v(t,\\reply{s})|^2 ds\\\\\n&\\leq \\sum_{K \\in \\mathcal{T}_n} \\frac{C_a^2C_{\\text{inv}}p^2|\\partial K|}{|K|}\\int_{ K} |\\nabla v(t,\\reply{x})|^2 dx\\\\\n&\\leq \\sum_{K \\in \\mathcal{T}_n} \\frac{c_{\\mathcal T} C_a^2 C_{\\text{inv}}p^2}{c_a h_K}\\int_{ K} |\\sqrt{a} \\nabla v(t,\\reply{x})|^2 dx.\n\\end{split}\n\\]\nHence, if the penalisation parameter $C_{\\sigma_0}$ is chosen large enough: in particular \n\\begin{equation}\n \\label{eq:Cstab_ineq}\nC_{\\sigma_0} \\geq c_\\mathcal{T} C_a^2 C_{\\text{inv}}\/c_a, \n\\end{equation}\nsuffices we have that\n\\begin{equation}\\label{coercivity_inverse}\n \\begin{split} \n|\\lip{\\sa{a \\nabla v(t)}}{ \\sj{ v(t)}}{\\Gamma_n}| &\\le \\tfrac12 \\|\\sqrt{\\sigma_0}\\sj{v(t)}\\|^2_{\\Gamma_n}+\\tfrac12 \\int_{\\Gamma_n}\\sigma_0^{-1} |\\sa{a \\nabla v(t,\\reply{s})}|^2 ds\\\\\n\\\\&\\le \\tfrac12\\|\\sqrt{\\sigma_0}\\sj{v(t)}\\|^2_{\\Gamma_n} +\\tfrac{1}{\\reply{4}}\\|\\sqrt{a}\\widetilde{\\nabla} v(t)\\|^2_{\\Omega},\n \\end{split}\n\\end{equation}\nensuring the \\reply{non-negativity} of the energy $E_h(t,v)$ for functions in \\reply{$\\dspaceT{p}$}:\n\\[\nE_h(t,v) \\geq \\tfrac12\\|\\dot v(t)\\|^2_{\\Omega}+\\tfrac14\\|\\sqrt{a}\\widetilde{\\nabla} v(t)\\|^2_{\\Omega}, \\qquad \\text{for all } v \\in \\mathcal{X}+\\dspaceT{p}.\n\\]\n\n Choosing as test function $v = u$ in \\eqref{weak_IP_one} and summing over $n$, we obtain\n\\[\n\\begin{split}\n 0 &= \\sum_{n = 0}^{N-1} \\int_{I_n}\\frac{d}{dt} \\Big(\\tfrac12 \\ltwo{\\dot u}{\\Omega}^2+\\tfrac12 \\ltwo{\\sqrt{a} \\widetilde{\\nabla} u}{\\Omega}^2- \\lip{\\sa{a\\nabla u}}{\\sj{ u}}{\\Gamma_n} + \\tfrac12 \\ltwo{\\sqrt{\\sigma_0} \\sj{u}}{\\Gamma_n}^2 \\Big) dt\n\\\\\n&= E_h(t_N^-,u)-E_h(t_0^+,u)-\\sum_{n = 1}^{N-1}\\tj{E_h(t_n,u)}.\n\\end{split}\n\\] \nIn order to allow for discontinuities in time, the formulation \\eqref{weak_IP_one} needs to be modified (in a consistent fashion) to control the terms $\\tj{E_h(t_n,u)}$ that have no sign. To this end, we shall use the elementary algebraic identity\n\\begin{equation}\n \\label{eq:upwind}\n \\begin{split} \n -\\tj{ f(u(t_n))g(u(t_n))} +\\tj{ f(u(t_n))}g(u(t_n^+))\n&+ \\tj{ g(u(t_n))}f(u(t_n^+)) \\\\\n &= \\tj{f(u(t_n))}\\tj{g(u(t_n))},\n \\end{split}\n\\end{equation}\n\\reply{for some scalar quantities $f,g$ which may, in general, be discontinuous across $t_n$. The idea here is to add terms that change the jump of a product to the product of jumps in the above energy identity, without compromising its consistency. For instance, to $\\lip{\\ddot u}{ \\dot v}{\\Omega \\times I_n} $ in \\eqref{weak_IP_one} we add the extra term $\\lip{\\tj{\\dot u(t_n)}}{\\dot v(t_n^+)}{\\Omega}$.\nFor $n > 0$, this does not change the consistency of \\eqref{weak_IP_one} with respect to \\eqref{eq:wave} in weak form, as the smoothness assumptions on the initial data ensure that the exact solution satisfies $\\dot u \\in C([0,T]; L^2(\\Omega))$; for $n = 0$, we have by the initial condition $\\dot u(t_0) = v_0$ that\n\\[\n\\lip{\\tj{\\dot u(t_0)}}{\\dot v(t_0^+)}{\\Omega}\n= \\lip{\\dot u(t_0^+)}{\\dot v(t_0^+)}{\\Omega}\n= \\lip{v_0}{\\dot v(t_0^+)}{\\Omega}.\n\\]\nHence, for consistency, we add the term $\\lip{\\dot u_0}{\\dot v(t_0^+)}{\\Omega}$ to the right-hand side also.\nUsing \\eqref{eq:upwind} now, for $u=v=w$, with $w$ piecewise sufficiently smooth function, we have\n\\[\n\\begin{split} \n\\sum_{n = 0}^{N-1}\\lip{\\ddot w}{ \\dot w}{\\Omega \\times I_n} +\\lip{\\tj{\\dot w(t_n)}}{\\dot w(t_n^+)}{\\Omega}\n=& \\tfrac12\\ltwo{\\dot w(t^-_N)}{\\Omega}^2+\\sum_{n = 0}^{N-1}\\lip{\\tj{\\dot w(t_n)}}{\\dot w(t_n^+)}{\\Omega} -\\tj{\\tfrac12\\ltwo{\\dot w(t_n)}{\\Omega}^2} \\\\\n=&\\tfrac12\\ltwo{\\dot w(t_N^-)}{\\Omega}^2+\\tfrac12\\ltwo{\\dot w(t_0^+)}{\\Omega}^2+\n\\tfrac12\\sum_{n = 1}^{N-1}\\ltwo{\\tj{\\dot w(t_n)}}{\\Omega}^2,\n\\end{split}\n\\]\nwith the additional terms contributing to energy dissipation leading to a stable method.\nCompletely analogous considerations lead to addition of corresponding terms to treat the second and the last terms on the left-hand side of \\eqref{weak_IP_one}. For the remaining third and fourth terms on the left-hand side of \\eqref{weak_IP_one}, we include the additional terms $ - \\lip{\\tj{\\sa{a\\widetilde{\\nabla} u(t_n)}}}{\\sj{ v(t_n^+)}}{\\hat{\\Gamma}_n}$ and $- \\lip{\\tj{\\sj{u(t_n)}}}{\\sa{a\\nabla v(t_n^+)}}{\\hat{\\Gamma}_n}$; note that these again do not change the consistency due to both $u\\in C([0,T]; H^1_0(\\Omega))$ and \\eqref{eq:transmission}. The use of $\\hat{\\Gamma}_n = \\Gamma_{n-1} \\cup \\Gamma_n$ in the last terms also merits a brief explanation: since we assume that both the solution and its spatial flux are continuous within a space-time element $K \\times I_n$, $K \\in \\mathcal{T}_n$ it follows that\n\\[\n \\lip{\\sa{a \\nabla u}}{\\sj{\\dot v}}{\\Gamma_n \\times I_n} = \\lip{\\sa{a \\nabla u}}{\\sj{\\dot v}}{\\hat{\\Gamma}_n \\times I_n}\\ \\text{ and }\\ \n \\lip{\\sj{u}}{\\sa{a \\nabla \\dot v}}{\\Gamma_n \\times I_n}\n= \\lip{\\sj{u}}{\\sa{a \\nabla \\dot v}}{\\hat{\\Gamma}_n \\times I_n}.\n\\]\n}\n\\reply{For consistency, the terms $- \\lip{ \\sa{a\\nabla u_0}}{\\sj{ v(t_0^+)}}{\\Gamma_0}- \\lip{ \\sj{u_0}}{\\sa{a\\nabla v(t_0^+)}}{\\Gamma_0}$ are also added to the right-hand side of \\eqref{weak_IP_one}. The above identity can again be used to show that we will have terms of the type $\\lip{\\tj{\\sa{a\\widetilde{\\nabla} u(t_n)}}}{\\tj{\\sj{ u(t_n)}}}{\\hat{\\Gamma}_n}$ in the energy identity; these do not have a sign but can be bounded by the other terms in the energy using \\eqref{coercivity_inverse}.}\n\nIn view of the above considerations, we can now state the space-time weak formulation of our method:\n\\begin{equation}\n \\label{eq:formulation}\n \\begin{aligned}\n\\sum_{n = 0}^{N-1}\\lip{\\ddot u}{ \\dot v}{\\Omega \\times I_n} &+\\lip{\\tj{\\dot u(t_n)}}{\\dot v(t_n^+)}{\\Omega} \n+\\lip{a \\widetilde{\\nabla} u}{ \\widetilde{\\nabla} \\dot v}{\\Omega \\times I_n} + \\lip{\\tj{a \\widetilde{\\nabla} u(t_n)}}{\\widetilde{\\nabla} v(t_n^+)}{\\Omega}\\\\\n&- \\lip{\\sa{a \\nabla u}}{\\sj{\\dot v}}{\\Gamma_n \\times I_n} - \\lip{\\tj{\\sa{a\\widetilde{\\nabla} u(t_n)}}}{\\sj{ v(t_n^+)}}{\\hat{\\Gamma}_n} \n\\\\ &- \\lip{\\sj{u}}{\\sa{a \\nabla \\dot v}}{\\Gamma_n \\times I_n} \n- \\lip{\\tj{\\sj{u(t_n)}}}{\\sa{a\\nabla v(t_n^+)}}{\\hat{\\Gamma}_n} \n\\\\ &+ \\lip{\\sigma_0 \\sj{u}}{\\sj{\\dot v}}{\\Gamma_n \\times I_n} + \\lip{\\sigma_0 \\tj{ \\sj{u(t_n)}}}{ \\sj{ v(t_n^+)}}{\\hat{\\Gamma}_n} \n\\\\ &+ \\lip{\\sigma_1 \\sj{u}}{\\sj{v}}{\\Gamma_n \\times I_n}\n+\\lip{\\sigma_2 \\sj{a\\nabla u}}{\\sj{a\\nabla v}}{\\Gamma_n \\times I_n} = b^{\\text{init}}(v),\n \\end{aligned}\n\\end{equation}\n\\reply{where $b^{\\text{init}}$ is given by\n\\begin{equation}\n \\label{eq:rhsform_init}\n \\begin{aligned} \n b^{\\text{init}}(v) := & \n\\lip{ v_0}{ \\dot v(t_0^+)}{\\Omega} + \\lip{a \\widetilde{\\nabla} u_0}{ \\widetilde{\\nabla} v(t_0^+)}{\\Omega}\n- \\lip{ \\sa{a\\nabla u_0}}{\\sj{ v(t_0^+)}}{\\Gamma_0}\\\\\n&- \\lip{ \\sj{u_0}}{\\sa{a\\nabla v(t_0^+)}}{\\Gamma_0}\n+ \\lip{\\sigma_0 \\sj{u_0}}{\\sj{ v(t_0^+)}}{\\Gamma_0}.\n \\end{aligned} \n\\end{equation}}\nNote that the last two terms in the definition of $b^{\\text{init}}$ are zero if the initial data is continuous in space.\nThe terms with positive penalty parameters $\\sigma_1$ and $\\sigma_2$ in the weak formulation \\eqref{eq:formulation} do not affect the consistency of the weak formulation; the need for their inclusion in the method will become apparent in the convergence analysis.\n\n\n\\reply{ Although the choice of $\\sigma_0$, $\\sigma_1$, and $\\sigma_2$ will only become evident in the analysis, for easy referral we state the choice of the stabilisation parameters $\\sigma_0$, $\\sigma_1$, and $\\sigma_2$ here also: $\\sigma_0$ is chosen as \\eqref{eq:sigma_defn}, (see also \\eqref{eq:Cstab_ineq},) and we set\n\\[\n\\sigma_1|_{\\partial K\\cap \\Gamma_n\\times I_n}= C_a\\frac{ p^3}{h\\tau_n} , \\qquad\n\\sigma_2 = \\frac{h}{C_a\\tau_n}.\n\\]\n}\n\nThus, we arrive at a space-time discrete method, which can be thought of in two ways: as a method for obtaining a discrete solution on a fixed space-time domain $\\Omega \\times [0,T]$, or as a time-stepping method. The former viewpoint will be useful in obtaining convergence estimates, while the latter in implementing the method. Consequently, we define the following three bilinear forms to describe these two viewpoints:\n\\begin{equation}\n \\label{eq:lhsform}\n \\begin{aligned} \n a_n(u,v) &:=\\\n \\lip{\\ddot u}{\\dot v}{\\Omega \\times I_n}+ \\lip{\\dot u(t^+_n)}{ \\dot v(t_n^+)}{\\Omega} \\\\\n &+\\lip{a\\widetilde{\\nabla} u}{\\widetilde{\\nabla} \\dot v}{\\Omega \\times I_n}+ \\lip{ a\\widetilde{\\nabla} u(t_n^+)}{ \\widetilde{\\nabla} v(t_n^+)}{\\Omega}\\\\\n &- \\lip{\\sa{a\\nabla u}}{\\sj{\\dot v}}{\\Gamma_n \\times I_n}- \\lip{\\sa{a\\nabla u(t_n^+)}}{\\sj{ v(t_n^+)}}{\\Gamma_n} \\\\\n &- \\lip{\\sj{u}}{ \\sa{a\\nabla \\dot v}}{\\Gamma_n \\times I_n} - \\lip{\\sj{u(t_n^+)}}{\\sa{a\\nabla v(t_n^+)}}{\\Gamma_n} \\\\\n &+ \\lip{\\sigma_0 \\sj{u}}{ \\sj{\\dot v}}{\\Gamma_n \\times I_n} + \\lip{\\sigma_0 \\sj{u(t_n^+)}}{\\sj{ v(t_n^+)}}{\\Gamma_n} \\\\\n&+ \\lip{\\sigma_1 \\sj{u}}{ \\sj{ v}}{\\Gamma_n \\times I_n}\n+ \\lip{\\sigma_2 \\sj{a \\nabla u}}{ \\sj{a \\nabla v}}{\\Gamma_n \\times I_n},\n \\end{aligned}\n\\end{equation}\n\\begin{equation}\n \\label{eq:rhsform}\n \\begin{aligned} \n b_n(u,v) :=&\\ \n\\lip{ \\dot u(t^-_n)}{ \\dot v(t_n^+)}{\\Omega} + \\lip{a\\widetilde{\\nabla} u(t_n^-)}{ \\widetilde{\\nabla} v(t_n^+)}{\\Omega}\n- \\lip{ \\sa{a\\nabla u(t_n^-)}}{\\sj{ v(t_n^+)}}{\\Gamma_n}\\\\\n&- \\lip{ \\sj{u(t_n^-)}}{\\sa{a\\nabla v(t_n^+)}}{\\Gamma_{n-1}}\n+ \\lip{\\sigma_0 \\sj{u(t_n^-)}}{\\sj{ v(t_n^+)}}{\\hat{\\Gamma}_n},\n \\end{aligned} \n\\end{equation}\n and\n\\begin{equation}\n \\label{eq:aform} \na(u,v) := \\sum_{n = 0}^{N-1} a_n(u,v)-\\sum_{n = 1}^{N-1}b_n(u,v),\n\\end{equation}\nwhich just gives the left-hand side in \\eqref{eq:formulation}. \n\\begin{definition}\\label{defn:time_stepping}\nGiven subspaces $X_n \\subseteq \\dspace{p}$, the time-stepping method is described by: find $u^n \\in X_n$, $n = 1, 2, \\dots, N-1$, such that\n\\begin{equation}\n \\label{eq:timestep}\na_n(u^n,v) = b_n(u^{n-1},v), \\qquad \\text{ for all }v \\in X_n\n\\end{equation}\n\\reply{and\n\\begin{equation}\n \\label{eq:timestep_initial}\n a_0(u^0,v) = b^{\\text{init}}(v), \\qquad \\text{ for all }v \\in X_0.\n\\end{equation}}\n Equivalently, given a subspace $X \\subseteq \\dspaceT{p}$, the full space-time discrete system can be presented as: find $u \\in X$ such that\n\\begin{equation}\n \\label{eq:fullsys}\n a(u,v) = b^{\\text{init}}(v), \\qquad \\text{for all } v \\in X.\n\\end{equation} \n\\end{definition}\n\\begin{lemma}\n The following identities hold for \\reply{any $w \\in \\mathcal{X}+ \\dspaceT{p}$}:\n\\begin{equation}\n \\label{eq:a_nuu}\na_n(w,w) = E_h(t_{n+1}^-,w)+E_h(t_n^+,w)+\\ltwo{\\sqrt{\\sigma_1} \\sj{w}}{\\Gamma_n \\times I_n}^2\n+ \\ltwo{\\sqrt{\\sigma_2} \\sj{a \\nabla w}}{\\Gamma_n \\times I_n}^2, \n\\end{equation}\nfor $n = 0,1,\\dots,N-1$, and\n\\begin{equation}\n \\label{eq:dg_norm_expr} \n\\begin{split} \na(w,w) = E_h(t_N^-,w)&+E_h(t_0^+,w) +\\sum_{n = 1}^{N-1} \\Big(\\tfrac12 \\ltwo{ \\tj{\\dot w(t_n)}}{\\Omega}^2+\\tfrac12\\ltwo{\\sqrt{a}\\tj{ \\widetilde{\\nabla} w(t_n)}}{\\Omega}^2 \\\\\n&-\\lip{\\tj{\\sa{a \\widetilde{\\nabla} w(t_n)}}}{\\tj{\\sj{w(t_n)}}}{\\hat{\\Gamma}_n}+\\tfrac12\\ltwo{ \\tj{\\sqrt{\\sigma_0}\\sj{w(t_n)}}}{\\hat{\\Gamma}_n}^2\\Big)\\\\\n&+ \\sum_{n = 0}^{N-1}\\Big(\\ltwo{\\sqrt{\\sigma_1} \\sj{w}}{\\Gamma_n \\times I_n}^2\n+ \\ltwo{\\sqrt{\\sigma_2} \\sj{a \\nabla w}}{\\Gamma_n \\times I_n}^2\\Big).\n\\end{split}\n\\end{equation} \n\\end{lemma}\n\\begin{proof}\n The identities follow from the definitions of the bilinear forms and the energy $E_h(t,w)$.\n\\end{proof}\n\nNext we investigate the consistency and stability of the discrete scheme.\n\n\\begin{theorem}[Consistency and Stability]\\label{thm:const_stab} Let the space $\\dspaceT{p}$ be given. Then, the following statements hold:\n \\begin{enumerate}\n \\item \\label{thm:consistency} Let $u$ be the weak solution of \\eqref{eq:wave}, with $u_0 \\in H^1_0(\\Omega)$ and $v_0 \\in L^2(\\Omega)$. Then $u$ satisfies \\eqref{eq:fullsys}.\n\\item \\label{thm:stability} \\reply{For $C_{\\sigma_0}$ satisfying} \\eqref{eq:Cstab_ineq} and for any $v \\in \\dspaceT{p}$ and $t \\in (0,T)$, the energy $E_h(t,v)$ \nis bounded from below by\n\\begin{equation}\\label{energy_positive}\nE_h(t,v) \\geq \\tfrac12\\ltwo{\\dot v(t)}{\\Omega}^2+\\tfrac14\\ltwo{\\sqrt{a}\\widetilde{\\nabla} v(t)}{\\Omega}^2. \n\\end{equation}\nFurther, if $X$ is a subspace of $\\dspaceT{p}$ and $U \\in X$ is the discrete solution, i.e., satisfies \\eqref{eq:fullsys}, then \n$\nE_h(t_N^-,U) \\leq E_h(t_1^-,U).\n$\n \\end{enumerate}\n\\end{theorem}\n\\begin{proof}\nStatement \\ref{thm:consistency} follows from the derivation of the formulation and the regularity of the unique solution $u$; see \\eqref{eq:smoothness} and \\eqref{eq:smoothness1}. We have already shown the positivity of the energy under the condition on $C_{\\sigma_0}$; see \\eqref{coercivity_inverse}. \n\nTo prove the remaining statement we proceed as follows. \\reply{Combining \\eqref{eq:fullsys} with \\eqref{eq:dg_norm_expr} gives} the energy identity \n\\begin{equation}\n \\label{eq:dis_energy}\n \\begin{split} \nE_h(t_N^-,U) = \\ & b^{\\text{init}}(U)-E_h(t_0^+,U)-\\sum_{n = 1}^{N-1} \\tfrac12 \\ltwo{\\tj{\\dot U(t_n)}}{\\Omega}^2+\\tfrac12\\ltwo{\\sqrt{a}\\tj{\\widetilde{\\nabla} U(t_n)}}{\\Omega}^2 \\\\\n&+\\sum_{n = 1}^{N-1} \\lip{\\tj{\\sa{a \\widetilde{\\nabla} U(t_n)}}}{\\tj{\\sj{U(t_n)} }}{\\hat{\\Gamma}_n}-\\tfrac12\\ltwo{\\sqrt{\\sigma_0} \\tj{\\sj{U(t_n)}}}{\\hat{\\Gamma}_n}^2\\\\\n&- \\sum_{n = 0}^{N-1}\\ltwo{\\sqrt{\\sigma_1}\\sj{U}}{\\Gamma_n \\times I_n}^2\n- \\sum_{n = 0}^{N-1}\\ltwo{\\sqrt{\\sigma_2}\\sj{a \\nabla U}}{\\Gamma_n \\times I_n}^2.\n \\end{split}\n\\end{equation}\n\nExpression \\eqref{eq:a_nuu}\nimplies that\n\\[\na_0(U,U) = E_h(t_{1}^-,U)+E_h(t_0^+,U)+\\ltwo{\\sqrt{\\sigma_1} \\sj{U}}{\\Gamma_0 \\times I_0}^2\n+ \\ltwo{\\sqrt{\\sigma}_2 \\sj{a \\nabla U}}{\\Gamma_0 \\times I_0}^2 = b^{\\text{init}}(U).\n\\]\nHence, the energy identity \\eqref{eq:dis_energy} can be written as\n\\begin{equation}\n \\label{eq:dis_energy1}\n \\begin{split} \nE_h(t_N^-,U) =&\\ E_h(t_1^-,U)-\\sum_{n = 1}^{N-1} \\Big(\\tfrac12 \\ltwo{\\tj{\\dot U(t_n)}}{\\Omega}^2+\\tfrac12\\ltwo{\\sqrt{a}\\tj{\\widetilde{\\nabla} U(t_n)}}{\\Omega}^2 \\\\\n&-\\lip{\\tj{\\sa{a\\widetilde{\\nabla} U(t_n)}}}{\\tj{\\sj{U(t_n)} }}{\\hat{\\Gamma}_n}+\\tfrac12\\ltwo{\\sqrt{\\sigma_0} \\tj{\\sj{U(t_n)}}}{\\hat{\\Gamma}_n}^2\\\\\n&+ \\ltwo{\\sqrt{\\sigma_1}\\sj{U}}{\\Gamma_n \\times I_n}^2\n+ \\ltwo{\\sqrt{\\sigma_2}\\sj{a \\nabla U}}{\\Gamma_n \\times I_n}^2\\Big).\n \\end{split}\n\\end{equation}\n Arguments used to prove the non-negativity of the discrete energy \\eqref{coercivity_inverse}, also show that the above equality implies that the discrete energy decreases at each time-step.\n\\end{proof}\n\n\\section{Polynomial Trefftz spaces}\\label{sec:Tspace}\n\nWe shall consider the discrete space of local polynomial solutions to the wave equation, where we make an additional assumption on the mesh and on $a(x)$ that allows us to define the Trefftz spaces. \\reply{Such polynomial spaces have already appeared in literature; see for example \\cite{KreMPS,MacJ,Whi03}.}\n\n\\begin{assumption}\nLet the diffusion coefficient $a(\\cdot)$ and the mesh be such that $a(\\cdot)$ is constant in each element $K \\in \\mathcal{T}_n$ for each $n$. \n\\end{assumption}\n\n\\begin{definition}[Polynomial Trefftz spaces]\\label{defn:trefftz_space}\nLet $S_{n,\\text{Trefftz}}^{h,p} \\subseteq \\dspace{p}$ be a subspace of functions satisfying the homogeneous wave equation on any space-time element $K \\times I_n$:\n\\[\nS_{n,\\text{Trefftz}}^{h,p}: = \\left \\{ v \\in \\dspace{p} \\;:\\; \\ddot v(t,x) -\\nabla \\cdot \\left( a \\,\\nabla v \\right)(t,x) = 0, \\quad t \\in I_n, x \\in K,\\, K\\in \\mathcal{T}_n\\right\\}.\n\\] \nThe space on $\\Omega \\times [0,T]$ is then defined as\n\\[\nV_{\\text{Trefftz}}^{h,p} = \\left\\{ u \\in L^2(\\Omega \\times [0,T]) \\;:\\; u|_{\\Omega \\times I_n} \\in S_{n,\\text{Trefftz}}^{h,p}, \\; n = 0,1\\dots, N-1\\right\\} \\subseteq \\dspaceT{p}.\n\\]\n\\end{definition}\nPolynomial plane waves are examples of functions in this space\n\\[\n(t+ a^{-1\/2}\\alpha \\cdot x )^j, \\qquad |\\alpha| = 1, \\alpha \\in \\mathbb{R}^d, j \\in \\{0,\\dots,p\\}.\n\\]\n\n\\begin{proposition}\\label{prop:trefftz_poly}\n The local dimension of the Trefftz space in $\\mathbb{R}^d$ is given by\n\\[\n\\operatorname{dim}(S_{n,\\text{Trefftz}}^{h,p}(K)) = \\left\\{\n \\begin{array}{cc}\n 2p+1 & d = 1\\\\\n (p+1)^2 & d = 2\\\\\n \\tfrac16 (p+1)(p+2)(2p+3) & d = 3\n \\end{array}\n\\right..\n\\]\n\\end{proposition}\n\\begin{proof}\n The proof for $d = 1$ is clear. For $d = 3$ in \\cite{Whi03} it is shown that the dimension of \\reply{the space of Trefftz, homogeneous polynomials of degree} $j$ is $(j+1)^2$, hence the total dimension is given by\n\\[\n\\sum_{j = 0}^p (j+1)^2 = \\tfrac16 (p+1)(p+2)(2p+3).\n\\]\nThe case $d = 2$ is proved similarly by noticing that the dimension of \\reply{the space of Trefftz, homogeneous polynomials} of degree $j$ is $2j+1$.\n\\end{proof}\n\n\\begin{example}\nIn two dimensions, \\reply{with a constant, scalar diffusion coefficient $a > 0$}, the following is a basis for $S_{n,\\text{Trefftz}}^{h,p}$ with $p = 3$\n\\[\n\\begin{split} \n\\{ &1,t,x,y,tx,ty,xy,at^2+x^2,at^2+y^2, \\\\ &xyt, at^3+3x^2t, x^3+3at^2x, y^3+3at^2y,(at^2+x^2)y, (at^2+y^2)x,(x^2-y^2)t\\}.\n\\end{split}\n\\]\n\\end{example}\n\\subsection{Existence and uniqueness}\nNext we prove that the discontinuous Galerkin energy norm is indeed a norm on the subspace of Trefftz polynomials. This also includes piecewise linear polynomials as $V_{\\text{Trefftz}}^{h,p} = \\dspaceT{p}$ for $p = 1$.\n\n\n\n\\begin{proposition}\\label{prop:seminorms}\nWith the choice of $C_{\\sigma_0}$ as in \\eqref{eq:Cstab_ineq} and $\\sigma_1, \\sigma_2 > 0$,\nbilinear forms $a_n(\\cdot,\\cdot)$ and $a(\\cdot,\\cdot)$ give rise to two semi-norms\n\\[\n\\dgnorm{v}_n := \\big(a_n(v,v)\\big)^{1\/2}, \\qquad v \\in \\dspace{p}\n\\] \nand\n\\[\n\\dgnorm{v} := \\big(a(v,v)\\big)^{1\/2}, \\qquad v \\in \\dspaceT{p}.\n\\] \nThese are in fact norms on Trefftz subspaces $S_{n,\\text{Trefftz}}^{h,p}$ and $V_{\\text{Trefftz}}^{h,p}$.\n\\end{proposition}\n\\begin{proof}\nRecalling \\eqref{eq:a_nuu} and using \\eqref{energy_positive}, we deduce that \n$\\dgnorm{v}_n^2 \\geq 0$ and is hence a semi-norm.\n\nSuppose $\\dgnorm{v}_n = 0$ for $v \\in S_{n,\\text{Trefftz}}^{h,p}$. Then, $a \\nabla v$ and $v$ have no jumps across the space skeleton and hence $v$ is a weak solution of the homogeneous wave equation on $\\Omega \\times I_n$ with zero initial and boundary conditions. Uniqueness implies $v \\equiv 0$ and hence that $\\dgnorm{\\cdot}_n$ is a norm on this space.\n\nThe analysis of $\\dgnorm{\\cdot}$ is similar recalling \\eqref{eq:dg_norm_expr}, which shows that $\\dgnorm{\\cdot}$ is a semi-norm if the stabilization parameter is chosen correctly. Proceeding as in the first case, shows that it is in fact a norm on the Trefftz spaces.\n\\end{proof}\n\n\\begin{corollary}\\label{cor:ex_un}\nUnder the conditions of the above proposition and with initial data $u_0 \\in H^1_0(\\Omega)$, $v_0 \\in L^2(\\Omega)$, the discrete system \\eqref{eq:fullsys} with $X = V_{\\text{Trefftz}}^{h,p}$ has a unique solution.\n\\end{corollary}\n\\begin{proof}\n The uniqeness of the solution to \\eqref{eq:fullsys} over the Trefftz space $X = V_{\\text{Trefftz}}^{h,p}$ follows from $a(\\cdot,\\cdot)$ being a norm on this space. Existence of the solution to the linear system follows from uniqueness.\n\\end{proof}\n\nNext, we present the convergence analysis of the Trefftz based method.\n\n\n\\subsection{Convergence analysis}\nWe shall now establish the quasi-optimality of the proposed method.\n\n\\begin{proposition}\nLet \\our{$w \\in \\mathcal{X} + V_{\\text{Trefftz}}^{h,p}$} and $v \\in V_{\\text{Trefftz}}^{h,p}$, then \n\\[\n|a(w,v)| \\leq C_\\star \\dgnorml{w}\\dgnorm{v},\n\\] \nfor some constant $C_\\star > 0$ and \n\\[\n\\begin{split}\n\\dgnorml{w}^2 =& \\tfrac12\\sum_{n = 1}^{N} \\Big(\\|\\dot w(t_n^-)\\|^2_{\\Omega}+\\|\\sqrt{a}\\nabla w(t_n^-)\\|^2_{\\Omega}\n+\\|\\sqrt{\\sigma_0}\\sj{w(t_n^-)}\\|^2_{\\Gamma_n}+\\|\\sigma_0^{-1\/2}\\sa{a\\nabla w(t_n^-)}\\|^2_{\\Gamma_n}\\Big)\\\\\n&+\\sum_{n = 0}^{N-1}\\left(\\ltwo{\\sqrt{\\sigma_1}\\sj{w}}{\\Gamma_n \\times I_n}^2\n+\\ltwo{\\sqrt{\\sigma_2}\\sj{a\\nabla w}}{\\Gamma_n \\times I_n}^2\n+\\ltwo{\\sigma_2^{-1\/2}\\sa{\\dot w}}{\\Gamma_n^{\\rm int} \\times I_n}^2\\right.\\\\\n&\\qquad\\qquad+\\left.\\ltwo{\\sigma_1^{-1\/2} \\sa{a\\nabla \\dot w}}{\\Gamma_n \\times I_n}^2+\\ltwo{\\sigma_0\\sigma_1^{-1\/2}\\sj{\\dot w}}{\\Gamma_n \\times I_n}^2\\right).\n\\end{split}\n\\]\n\\end{proposition}\n\\begin{proof}\nIntegration by parts gives\n\\[\n\\begin{split}\n \\lip{\\ddot w}{ \\dot v}{\\Omega\\times I_n} + \\lip{a\\nabla w}{ \\nabla \\dot v}{\\Omega\\times I_n} \n =\\ &-\\lip{\\dot w}{ \\ddot v}{\\Omega\\times I_n} - \\lip{a\\nabla \\dot w}{ \\nabla v}{\\Omega\\times I_n} \\\\\n&+\\lip{\\dot w(t_{n+1}^-)}{ \\dot v(t_{n+1}^-)}{\\Omega}-\\lip{\\dot w(t_{n}^+)}{ \\dot v(t_{n}^+)}{\\Omega}\\\\\n& + \\lip{a\\nabla w(t_{n+1}^-)}{ \\nabla v(t_{n+1}^-)}{\\Omega}-\\lip{a\\nabla w(t_n^+)}{ \\nabla v(t_n^+)}{\\Omega}\\\\\n=\\ &-\\lip{\\sj{\\dot w}}{\\sa{a \\nabla v}}{\\Gamma_n\\times I_n}-\\lip{\\sa{\\dot w}}{\\sj{a \\nabla v}}{\\Gamma_n^{\\text{int}}\\times I_n}\\\\\n&+\\lip{\\dot w(t_{n+1}^-)}{ \\dot v(t_{n+1}^-)}{\\Omega}-\\lip{\\dot w(t_{n}^+)}{ \\dot v(t_{n}^+)}{\\Omega}\\\\\n& + \\lip{a\\nabla w(t_{n+1}^-)}{ \\nabla v(t_{n+1}^-)}{\\Omega}-\\lip{a\\nabla w(t_n^+)}{ \\nabla v(t_n^+)}{\\Omega},\n\\end{split}\n\\]\nsince $v\\in V_{\\text{Trefftz}}^{h,p}$ and by using the (elementary) identity\n\\[\n-\\lip{a\\nabla \\dot w}{ \\nabla v}{\\Omega\\times I_n} = \\lip{\\dot w}{ \\nabla\\cdot a\\nabla v}{\\Omega\\times I_n} \n-\\lip{\\sj{\\dot w}}{\\sa{a \\nabla v}}{\\Gamma_n\\times I_n}-\\lip{\\sa{\\dot w}}{\\sj{a \\nabla v}}{\\Gamma_n^{\\text{int}}\\times I_n},\n\\]\nin the second step. Further applications of integration by parts in time yield\n\\[\n\\begin{split}\n&-\\lip{\\sj{\\dot w}}{\\sa{a \\nabla v}}{\\Gamma_n\\times I_n} \\\\\n=\\ & \\lip{\\sj{ w}}{\\sa{a \\nabla \\dot v}}{\\Gamma_n\\times I_n}-\\lip{\\sj{ w(t_{n+1}^-)}}{\\sa{a \\nabla v(t_{n+1}^-)}}{\\Gamma_n} +\\lip{\\sj{ w(t_{n}^+)}}{\\sa{a \\nabla v(t_{n}^+)}}{\\Gamma_n},\n\\end{split}\n\\]\nand\n\\[\n\\begin{split} \n&-\\lip{ \\sa{a\\nabla w} }{ \\sj{\\dot v}}{\\Gamma_n\\times I_n} +\\lip{\\sigma_0 \\sj{w}}{ \\sj{\\dot v}}{\\Gamma_n\\times I_n}\\\\\n= \\ & \\lip{\\sa{a\\nabla \\dot w}}{ \\sj{v}}{\\Gamma_n\\times I_n} -\\lip{\\sigma_0 \\sj{\\dot w}}{\\sj{ v}}{\\Gamma_n\\times I_n} \\\\\n&-\\lip{ \\sa{a\\nabla w(t_{n+1}^-)}}{ \\sj{ v(t_{n+1}^-)}}{\\Gamma_n}\n+\\lip{ \\sa{a\\nabla w(t_{n}^+)}}{ \\sj{ v(t_{n}^+)}}{\\Gamma_n}\\\\\n&+\\lip{\\sigma_0\\sj{w(t_{n+1}^-)}}{ \\sj{ v(t_{n+1}^-)}}{\\Gamma_n}\n-\\lip{\\sigma_0 \\sj{w(t_{n}^+)}}{ \\sj{ v(t_{n}^+)}}{\\Gamma_n}.\n\\end{split}\n\\]\nSubstituting these int\n\\eqref{eq:lhsform}, we obtain\n\\begin{equation}\n \\label{eq:trefftz_bfn} \n \\begin{aligned} \n a_n(w,v) =& \\ \n \\lip{\\sa{a\\nabla \\dot w}}{\\sj{ v}}{\\Gamma_n \\times I_n}- \\lip{\\sa{a\\nabla w(t_{n+1}^-)}}{\\sj{ v(t_{n+1}^-)}}{\\Gamma_n} \\\\\n&- \\lip{\\sigma_0 \\sj{\\dot w}}{\\sj{v}}{\\Gamma_n \\times I_n}+ \\lip{\\sigma_0 \\sj{w(t_{n+1}^-)}}{\\sj{ v(t_{n+1}^-)}}{\\Gamma_n}\\\\\n&- \\lip{ \\sa{\\dot w}}{ \\sj{a \\nabla v}}{\\Gamma_n^{\\rm int}\\times I_n}- \\lip{\\sj{w(t_{n+1}^-)}}{\\sa{a\\nabla v(t_{n+1}^-)}}{\\Gamma_n} \\\\\n&+ \\lip{\\dot w(t^-_{n+1})}{\\dot v(t_{n+1}^-)}{\\Omega} + \\lip{a\\nabla w(t_{n+1}^-)}{ \\nabla v(t_{n+1}^-)}{\\Omega}\\\\\n&\n+ \\lip{\\sigma_1 \\sj{w}}{\\sj{ v}}{\\Gamma_n \\times I_n}\n+ \\lip{\\sigma_2 \\sj{a\\nabla w}}{\\sj{a \\nabla v}}{\\Gamma_n \\times I_n}.\n \\end{aligned}\n\\end{equation}\nTherefore, upon adopting the notational convention \n$\n\\tj{f(t_N^-)} := f(t_N^-), \n$\nwe have\n\\begin{equation}\n \\label{eq:trefftz_bf} \n\\begin{split}\n a(w,v) =& \\sum_{n = 0}^{N-1}a_n(w,v) - \\sum_{n = 1}^{N-1}b_n(w,v)\\\\\n=& \\sum_{n = 0}^{N-1}\\Big( \\lip{\\sa{a\\nabla\\dot w}}{ \\sj{ v}}{\\Gamma_n\\times I_n}\n- \\lip{\\sigma_0 \\sj{\\dot w}}{ \\sj{v}}{\\Gamma_n\\times I_n} \n- \\lip{ \\sa{\\dot w}}{ \\sj{a\\nabla v}}{\\Gamma_n^{\\rm int}\\times I_n} \\\\\n&+ \\lip{\\sigma_1 \\sj{w}}{ \\sj{ v}}{\\Gamma_n \\times I_n}\n+\\lip{\\sigma_2 \\sj{a\\nabla w}}{ \\sj{a \\nabla v}}{\\Gamma_n \\times I_n}\\Big)\\\\\n&- \\sum_{n = 1}^{N}\\Big(\\lip{ \\dot w(t_n^-)}{ \\tj{\\dot v(t_n)}}{\\Omega} + \\lip{a\\nabla w(t_n^-)}{ \\tj{\\nabla v(t_n)}}{\\Omega}\\\\\n&- \\lip{\\sa{a\\nabla w(t_n^-)}}{\\tj{\\sj{ v(t_n)}}}{\\Gamma_n} \n- \\lip{ \\sj{w(t_n^-)}}{\\tj{\\sa{a\\nabla v(t_n)}}}{\\Gamma_n}\\\\\n&+ \\lip{\\sigma_0 \\sj{w(t_n^-)}}{\\tj{\\sj{ v(t_n)}}}{\\Gamma_n}\\Big).\n\\end{split}\n\\end{equation}\n\n\nIt is now clear how to estimate most of the terms to obtain the stated result using the Cauchy-Schwarz inequality. \nThe first two terms on the right hand side in the above sum are estimated as follows\n\\[\n \\lip{ \\sigma_1^{-1\/2}(\\sa{a\\nabla\\dot w}- \\sigma_0 \\sj{\\dot w})}{\\sqrt{\\sigma_1}\\sj{ v}}{\\Gamma_n \\times I_n}\n\\leq \\ltwo{\\sigma_1^{-1\/2}(\\sa{a\\nabla\\dot w}- \\sigma_0 \\sj{\\dot w})}{\\Gamma_n \\times I_n}\n\\ltwo{\\sqrt{\\sigma_1} \\sj{v}}{\\Gamma_n \\times I_n};\n\\]\nfor the third term, we have \n\\[\n\\begin{split}\n\\lip{ \\sa{\\dot w}}{ \\sj{a\\nabla v}}{\\Gamma_n^{\\rm int}\\times I_n} \n& \\le \\ltwo{\\sigma_2^{-1\/2} \\sa{\\dot w}}{\\Gamma_n^{\\rm int} \\times I_n} \\ltwo{\\sqrt{\\sigma_2} \\sj{a\\nabla v}}{\\Gamma_n^{\\rm int} \\times I_n}.\n\\end{split}\n\\]\n\\end{proof}\n\n\\begin{remark}\\label{rem:cheaper}\n Note that \\eqref{eq:trefftz_bfn} shows that for Trefftz functions the bilinear form can be evaluated without computing integrals over the volume terms $\\Omega \\times I_n$. This can bring considerable savings, especially in higher spatial dimensions; see Figure~\\ref{fig:Conv_Time}.\n\\end{remark}\n\n\\reply{\nIt is possible to define the space-time dG method above with the classical (discontinuous) space of \\emph{all} polynomials of degree $p$ (total degree or of degree $p$ on each variable). The resulting method then appears to work in practice also. Some numerical experiments and comparison with the smaller polynomial Trefftz space are given Section \\ref{sec:numerics}. The error analysis of the method with the full polynomial space of degree $p$ is not straightforward, though. In particular, it is not immediately clear how to treat the volume terms which do not vanish in this case. This would be essential in completing an error analysis for such spaces also.}\n\n\n\n\\begin{theorem}\\label{th:best_approx}\n Let $U \\in V_{\\text{Trefftz}}^{h,p}$ be the discrete solution of the Trefftz time-space discontinuous Galerkin method and let \\our{$u \\in \\mathcal{X}$} be the exact solution. Then, we have\n\\[\n\\dgnorm{U-u} \\leq\\inf_{V \\in V_{\\text{Trefftz}}^{h,p}}\\big ( C_\\star \\dgnorml{V - u}+\\dgnorm{V-u} \\big). \n\\]\n\n\\end{theorem}\n\\begin{proof}\nBy Galerkin orthogonality\n\\[\na(V -U, v) = a(V-u,v),\n\\]\nfor any $V,v \\in V_{\\text{Trefftz}}^{h,p}$. Hence,\n\\[\n\\dgnorm{V - U}^2 = a(V - U, V - U)\n = a(V - u, V - U) \\leq C_\\star \\dgnorml{V - u}\\dgnorm{V - U},\n\\]\ngiving\n\\[\n\\dgnorm{U-u} \\leq \\dgnorm{V-U}+\\dgnorm{V-u} \\leq C_\\star\\dgnorml{V - u}+\\dgnorm{V-u}.\n\\]\n\\end{proof}\n\nTo conclude this section we show that in the case of Trefftz polynomials, the discrete norm can be bounded below by an $L^2$-temporal norm. For simplicity of the presentation \\emph{only}, we shall, henceforth, make the following assumption.\n \\our{\n\\begin{assumption} \\label{as:st_reg}\nWe assume that $\\diam(K\\times I_n)\/\\rho_{K\\times I_n} \\leq c_{\\mathcal T}$, for all $K \\in \\mathcal{T}_n$, $n = 0,1,\\dots, N-1$.\n\\end{assumption}}\n\n\\our{In the simplifying context of space-time meshes consisting of prismatic meshes without local time-stepping, Assumption \\ref{as:st_reg} implies global quasi-uniformity. Given the tensor-product\/pris\\-matic structure of the space-time elements $K\\times I_n$, it is by all means possible to extend the error analysis below to space-time meshes not satisfying Assumption \\ref{as:st_reg}. Moreover, with minor modifications only, it is possible to extend the findings of this work to meshes with space-time elements with variable temporal dimension lengths; the notational overhead for such a development is deemed excessive given the a-priori error analysis point of view of this work.}\n\n\\begin{proposition}\\label{prop:positiveE}\n For any $v \\in S_{n,\\text{Trefftz}}^{h,p}$ it holds\n\\[\n\\ltwo{\\dot v}{\\Omega \\times I_n}^2+\\ltwo{\\sqrt{a}\\widetilde{\\nabla} v}{\\Omega \\times I_n}^2 \n\\leq (t_{n+1}-t_n)e^{\\widetilde C(t_{n+1}-t_n)\/\\underline{h}}\\left(\\ltwo{\\dot v(t_n^+)}{ \\Omega}^2+\\ltwo{\\sqrt{a} \\widetilde{\\nabla} v(t_n^+)}{ \\Omega}^2 \\right),\n\\]\nwhere\n$\n\\reply{\\widetilde C} := c_{\\mathcal T}C_{\\text{inv}}p^2 C_a$ and\n$ \\underline{h} := \\min_{x \\in \\Omega} h(x,t)$, $t \\in I_n$.\nThe same estimate holds with $t_n^+$ replaced by $t_{n+1}^-$.\n\n\\reply{Consequently, under Assumption ~\\ref{as:st_reg},\n\\[\n\\|\\dot V\\|^2_{\\Omega \\times (0,T)}+\\|\\sqrt{a}\\widetilde{\\nabla} V\\|^2_{\\Omega \\times (0,T)}\n\\leq C e^{\\widetilde C c_{\\mathcal T}}T\\dgnorm{V}^2,\n\\]\nfor all $V \\in V_{\\text{Trefftz}}^{h,p}$ with a constant $C>0$ independent of the meshsize.}\n\\end{proposition}\n\\begin{proof}\nNote that for an element $K$ with exterior normal $\\nu$\n\\[\n\\begin{split} \n\\frac{d}{dt} \\left(\\tfrac12\\ltwo{\\dot v(t)}{K}^2+\\tfrac12 \\ltwo{\\sqrt{a} \\nabla v(t)}{K}^2\\right)\n &= \\lip{\\ddot v(t)}{ \\dot v(t)}{K} + \\lip{a\\nabla v(t)}{ \\nabla \\dot v(t)}{K}\\\\\n&= \\lip{\\nu \\cdot a \\nabla v(t)}{\\dot v(t)}{\\partial K}\\\\\n&\\leq \\tfrac12 \\ltwo{\\nu \\cdot a \\nabla v(t)}{\\partial K}^2 +\\tfrac12 \\ltwo{\\dot v(t)}{\\partial K}^2\\\\\n&\\leq C_{\\text{inv}}p^2 |\\partial K|\/|K|\\left(\\tfrac12\\ltwo{a \\nabla v(t)}{ K}^2+ \\tfrac12\\ltwo{\\dot v(t) }{ K}^2 \\right),\\\\\n&\\leq C_a C_{\\text{inv}}p^2 c_{\\mathcal T} h_K^{-1}\\left(\\tfrac12\\ltwo{\\sqrt{a}\\nabla v(t)}{ K}^2+ \\tfrac12\\ltwo{\\dot v(t) }{ K}^2 \\right),\n\\end{split}\n\\]\nwhere we have used the discrete trace inequality.\nGronwall inequality now gives us \n\\[\n\\tfrac12\\ltwo{\\sqrt{a}\\nabla v(t)}{K}^2+ \\tfrac12\\ltwo{\\dot v(t)}{ K}^2 \n\\leq e^{\\widetilde C(t-t_n)\/{h_K}}\\left(\\tfrac12\\ltwo{\\sqrt{a}\\nabla v(t_n^+)}{ K}^2+ \\tfrac12\\ltwo{\\dot v(t_n^+)}{ K}^2 \\right),\n\\]\nas well as\n\\[\n\\tfrac12\\ltwo{\\sqrt{a}\\nabla v(t)}{K}^2+ \\tfrac12\\ltwo{\\dot v(t)}{ K}^2 \n\\leq e^{\\widetilde C(t_{n+1}-t_n)\/h_K}\\left(\\tfrac12\\ltwo{\\sqrt{a}\\nabla v(t_{n+1}^-)}{ K}^2+ \\tfrac12\\ltwo{\\dot v(t_{n+1}^-)}{ K}^2 \\right),\n\\]\nfor all $t \\in [t_n,t_{n+1}]$. Integrating in time and summing over all $K$ gives the required result. \\reply{The final inequality follows from the definition of the discrete dG norm.}\n\\end{proof}\n\nThe above two results allow us to conclude that we can also bound the error in a more standard norm.\n\\begin{corollary}\\label{cor:positiveE}\nUnder the hypothesis of Theorem~\\ref{th:best_approx} and under Assumption \\ref{as:st_reg}, we have\n\\[\n\\begin{split} \n\\ltwo{\\dot U -\\dot u}{\\Omega \\times [0,T]}+\\ltwo{\\sqrt{a}\\widetilde{\\nabla} (U-u)}{\\Omega \\times [0,T]} \n\\leq C &\\inf_{V \\in V_{\\text{Trefftz}}^{h,p}}\\big ( C_\\star \\dgnorml{V - u}\\\\ &+\\ltwo{\\dot V -\\dot u}{\\Omega \\times [0,T]}+\\ltwo{\\sqrt{a}\\widetilde{\\nabla} (V-u)}{\\Omega \\times [0,T]} \\big),\n\\end{split}\n\\]\nfor some positive constant $C$, independent of the mesh parameters and of $u$ and $U$. \n\\end{corollary}\n\\begin{proof}\n\\reply{\nTriangle inequality and Proposition \\ref{prop:positiveE} imply that, for any $V \\in V_{\\text{Trefftz}}^{h,p}$, \n\\[\n\\begin{split} \n& \\ltwo{\\dot U -\\dot u}{\\Omega \\times [0,T]}+\\ltwo{\\sqrt{a}\\widetilde{\\nabla} (U-u)}{\\Omega \\times [0,T]}\\\\\n\\leq & \\ltwo{\\dot U -\\dot V}{\\Omega \\times [0,T]}+\\ltwo{\\sqrt{a}\\widetilde{\\nabla} (U-V)}{\\Omega \\times [0,T]}\n\\\\\n&+ \\ltwo{\\dot V -\\dot u}{\\Omega \\times [0,T]}+\\ltwo{\\sqrt{a}\\widetilde{\\nabla} (V-u)}{\\Omega \\times [0,T]}\\\\\n\\leq & C\\dgnorm{U-V}\n+ \\ltwo{\\dot V -\\dot u}{\\Omega \\times [0,T]}+\\ltwo{\\sqrt{a}\\widetilde{\\nabla} (V-u)}{\\Omega \\times [0,T]}.\n\\end{split}\n\\]\nAs in the proof of Theorem~\\ref{th:best_approx}, we also have that \n$\n\\dgnorm{V-U} \\leq C_\\star \\dgnorml{V-u},\n$\nwhich completes the proof.\n}\n\\end{proof}\n\n\\section{A priori error bounds}\\label{apriori}\nWe shown next the Trefftz basis \nis sufficient to deliver the expected rates of convergence for the proposed method.\n\n\n\\begin{lemma}\\label{lemma:abstract_error_bound}\nLet the setting of Theorem~\\ref{th:best_approx} hold, let $\\our{v}_h \\in V_{\\text{Trefftz}}^{h,p}$ be an arbitrary function in the discrete space, and let $\\eta = u-\\our{v}_h$. Then\n\\begin{equation}\\label{eq:abstract_error_bound}\n\\begin{aligned}\n\\dgnorm{U-u}^2 \\leq \\ & C\\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} \n\\our{C_a}\\bigg( \\frac{p^2}{\\our{\\tau_n}}\\Big( \\our{\\max\\big\\{1,\\frac{\\tau_n^2}{h_K^2}\\big\\}}\\|\\dot{\\eta}\\|_{ K\\times I_n}^2+ \\|\\nabla\\eta\\|_{ K\\times I_n}^2\\Big)\\\\\n&\\qquad\\quad\\qquad+\\our{\\tau_n}\\Big( \\|\\nabla\\dot{\\eta}\\|_{ K\\times I_n}^2+ \\our{\\max\\big\\{1,\\frac{h_K^2}{\\tau_n^2}\\big\\}}p^{-1}\\|D^2\\eta\\|_{ K\\times I_n}^2\\Big)\\\\\n&\\qquad\\quad\\qquad+\\frac{\\our{h_K^2\\tau_n}}{p^4} \\|D^2\\dot{\\eta}\\|_{ K\\times I_n}^2+\\our{\\frac{p^4}{h_K^2\\tau_n} \\|\\eta\\|_{ K\\times I_n}^2}\\bigg),\n\\end{aligned}\n\\end{equation}\nwhere $U \\in V_{\\text{Trefftz}}^{h,p}$ is the discrete solution. \n\\end{lemma}\n\\begin{proof}\n Theorem \\ref{th:best_approx} implies \n\\[\n\\dgnorm{U-u} \\leq C_\\star \\dgnorml{\\eta}+\\dgnorm{\\eta}.\n\\]\nWe shall now estimate each term of the norms on the right-hand side. We shall repeatedly use the standard trace estimate \n$\n \\| v \\|_{\\partial \\omega}^2 \\le C \\| v \\|_{ \\omega} ( \\| v \\|_{ \\omega}^2+ \\| \\nabla v \\|_{ \\omega}^2)^{1\/2},\n$\nfor $v\\in H^1(\\omega)$, where $\\omega$ is a subset of \\reply{$\\mathbb{R}^k$, $k=1,\\dots,d+1$}.\nWe proceed as follows:\n\\[\n\\begin{aligned}\n\\sum_{n = 1}^{N} \\|\\dot \\eta(t_n^-)\\|^2_{\\Omega} \n&= \\sum_{n = 1}^{N} \\sum_{K\\in \\mathcal{T}^{n-1}} \\|\\dot \\eta\\|^2_{K\\times \\{t_n^-\\}}\n\\le C\\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} \\Big( \\frac{C_a p}{\\our{\\tau_n} }\\|\\dot \\eta\\|^2_{K\\times I_n}+ \\frac{\\our{\\tau_n} }{C_a p}\\|\\ddot \\eta\\|^2_{K\\times I_n}\\Big)\\\\\n& \\le C\\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} \\Big( \\frac{C_a p}{\\our{\\tau_n} }\\|\\dot \\eta\\|^2_{K\\times I_n}+ \\frac{\\our{\\tau_n}}{C_a p}\\|\\nabla\\cdot a(\\cdot)\\nabla \\eta\\|^2_{K\\times I_n}\\Big)\\\\\n& \\le C\\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{p}{\\our{\\tau_n} }\\|\\dot \\eta\\|^2_{K\\times I_n}+ \\frac{\\our{\\tau_n}}{p}\\|\\Delta \\eta\\|^2_{K\\times I_n}\\Big);\n\\end{aligned}\n\\]\nWe prefer to retain an explicit dependence on the polynomial degree $p$ at this point, as it will be of relevance in the error analysis for $d=1$.\nIn analogous fashion, we also have\n\\[\n\\begin{aligned}\n\\sum_{n = 1}^{N} \\| \\sqrt{a}\\nabla \\eta(t_n^-)\\|^2_{\\Omega} \n&\n\\le C\\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{p}{\\our{\\tau_n}}\\|\\nabla \\eta\\|^2_{K\\times I_n}+ \\frac{\\our{\\tau_n}}{ p}\\|\\nabla\\dot \\eta\\|^2_{K\\times I_n}\\Big).\n\\end{aligned}\n\\]\nNext, we estimate the penalty term:\n\\[\n\\begin{aligned}\n\\sum_{n = 1}^{N} \\|\\sqrt{\\sigma_0^{}}\\sj{\\eta(t_n^-)}\\|^2_{\\Gamma_n} \n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{p^3}{\\our{\\tau_n h_K}}\\| \\eta\\|^2_{\\partial K\\times I_n}+ p\\our{\\frac{\\tau_n}{h_K}}\\|\\dot \\eta\\|^2_{\\partial K\\times I_n}\\Big)\\\\\n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{p^4}{\\our{\\tau_n h_K^2}}\\| \\eta\\|^2_{K\\times I_n}+\\frac{p^2}{\\our{\\tau_n} }\\|\\nabla \\eta\\|^2_{K\\times I_n}\\\\\n &\\qquad \\qquad\\qquad\\quad+ \\frac{p^2\\our{\\tau_n}}{\\our{h_K^2}}\\|\\dot \\eta\\|^2_{K\\times I_n}+ \\our{\\tau_n} \\| \\nabla\\dot\\eta\\|^2_{K\\times I_n}\\Big).\n\\end{aligned}\n\\]\nSimilarly, we also have\n\\[\n\\begin{aligned}\n\\sum_{n = 1}^{N} \\|\\sigma_0^{-1\/2}\\sa{a\\nabla \\eta(t_n^-)}\\|^2_{\\Gamma_n}\n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{\\our{h_K}}{p\\,\\our{\\tau_n}}\\| \\nabla \\eta\\|^2_{\\partial K\\times I_n}+ \\frac{\\our{h_K\\tau_n}}{p^3}\\|\\nabla\\dot \\eta\\|^2_{\\partial K\\times I_n}\\Big)\\\\\n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{1}{\\our{\\tau_n} }\\| \\nabla \\eta\\|^2_{K\\times I_n}+\\frac{\\our{h_K^2} }{p^2\\our{\\tau_n}}\\|D^2 \\eta\\|^2_{K\\times I_n}\\\\\n &\\qquad \\qquad\\qquad\\quad+ \\frac{\\our{\\tau_n} }{p^2}\\|\\nabla\\dot \\eta\\|^2_{K\\times I_n}+\\frac{\\our{h_K^2\\tau_n} }{p^4}\\| D^2\\dot\\eta\\|^2_{K\\times I_n}\\Big).\n\\end{aligned}\n\\]\nNext, recalling that $\\sigma_1|_{\\partial K\\cap \\Gamma_n\\times I_n}= C_a p^3\/(\\our{h_K\\tau_n} )$, we estimate\n\\[\n\\begin{aligned}\n\\sum_{n = 0}^{N-1}\\ltwo{\\sqrt{\\sigma_1}\\sj{\\eta}}{\\Gamma_n \\times I_n}^2\n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{p^4}{\\our{\\tau_n h_K^2}}\\| \\eta\\|^2_{ K\\times I_n}+ \\frac{p^2}{\\our{\\tau_n} }\\|\\nabla \\eta\\|^2_{K\\times I_n}\\Big).\n\\end{aligned}\n\\]\nFurther, since $\\sigma_2= \\our{h_K}\/(C_a\\our{\\tau_n})$, we have\n\\[\n\\begin{aligned}\n\\sum_{n = 0}^{N-1} \\ltwo{\\sqrt{\\sigma_2}\\sj{a\\nabla \\eta}}{\\Gamma_n \\times I_n}^2\n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{p^2}{\\our{\\tau_n} }\\|\\nabla \\eta\\|^2_{ K\\times I_n}+ \\frac{\\our{h_K^2}}{p^2\\our{\\tau_n}}\\|D^2 \\eta\\|^2_{K\\times I_n}\\Big).\n\\end{aligned}\n\\]\nThe next term is treated as follows:\n\\[\n\\begin{aligned}\n\\sum_{n = 0}^{N-1} \\ltwo{\\sigma_2^{-1\/2}\\sa{\\dot \\eta}}{\\Gamma_n^{\\rm int} \\times I_n}^2\n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{p^2\\our{\\tau_n}}{\\our{h_K^2} }\\| \\dot \\eta\\|^2_{ K\\times I_n}+ \\frac{\\our{\\tau_n} }{p^2}\\|\\nabla \\dot \\eta\\|^2_{K\\times I_n}\\Big).\n\\end{aligned}\n\\]\nContinuing, we have\n\\[\\begin{aligned}\n\\sum_{n = 0}^{N-1}\\ltwo{\\sigma_1^{-1\/2} \\sa{a\\nabla \\dot \\eta}}{\\Gamma_n \\times I_n}^2\n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{\\our{\\tau_n} }{p^2}\\| \\nabla \\dot\\eta\\|^2_{ K\\times I_n}+ \\frac{\\our{\\tau_n h_K^2}}{p^4}\\| D^2 \\dot \\eta\\|^2_{K\\times I_n}\\Big).\n\\end{aligned}\n\\]\nFinally, we estimate\n\\[\n\\begin{aligned}\n\\sum_{n = 0}^{N-1}\\ltwo{\\sigma_0\\sigma_1^{-1\/2}\\sj{\\dot u}}{\\Gamma_n \\times I_n}^2\n&\n\\le C \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} C_a \\Big( \\frac{p^2\\our{\\tau_n}}{\\our{h_K^2} }\\| \\dot\\eta\\|^2_{ K\\times I_n}+ \\our{\\tau_n} \\| \\nabla \\dot \\eta\\|^2_{K\\times I_n}\\Big).\n\\end{aligned}\n\\]\nThe remaining terms in $\\dgnorm{\\eta}$ are treated completely analogously.\n\\end{proof}\n\n\\our{We have kept the explicit dependence on the local spatial and temporal meshsizes to further emphasize that the proposed method does not require any CFL-type restrictions for stability and convergence: as long as $h_K\\sim \\tau_n$ the above bound is sufficient to show optimal convergence, as we shall see below.}\nTo complete the error analysis, we need to prove the existence of an appropriate approximation in $V_{\\text{Trefftz}}^{h,p}$ of the exact solution. We first show how to obtain\nsuch an approximation locally.\n\n\\begin{proposition}\nLet $J \\subset \\mathbb{R}^{d+1}$ be star-shaped with respect to a ball $B \\subset J$. Then, there exists a projector \n\\[\n\\Pi^{p}: H^{p+1}(J) \\rightarrow \\mathcal{P}_p(J)\n\\]\nsuch that for any $v \\in H^{p+1}(J)$\n\\[\n\\|D^\\beta (v-\\Pi^{p}v)\\|_{J} \\leq C(\\diam(J))^{p+1-|\\beta|} \\|v\\|_{H^{p+1}(J)}, \\qquad\n|\\beta| \\leq p\n\\]\nand further if $v$ satisfies the wave equation $\\ddot u - \\nabla \\cdot a \\nabla v = 0$ in $J$ then so does $\\Pi^pv$. The constant $C$ depends on $p$ and on the shape of $J$\\footnote{By the shape of the domain, is here meant the chunkiness parameter $\\diam(J)\/\\rho_{\\text{max}}$ where $\\rho_{\\text{max}} = \\sup\\{\\rho : J \\text{ is star-shaped with respect to a ball of radius } \\rho\\}$}.\n\\end{proposition}\n\\begin{proof}\nWe can define $\\Pi^p v$ to be the averaged Taylor polynomial of order $p$,\n\\[\n\\Pi^p v(x) = \\sum_{|\\alpha| \\leq p} \\frac1{\\alpha!} \\int_B D^\\alpha v(y) (x-y)^\\alpha \\phi(y) dy,\n\\]\nwhere $\\phi \\in C_0^\\infty(\\mathbb{R}^{d+1})$ is an arbitrary cut-off function satisfying $\\int_B \\phi = 1$ and $\\operatorname{supp} \\phi = \\overline{B}$; for details see \\cite{brenner_scott}. Then Bramble-Hilbert lemma gives us the approximation property required, see \\cite[Lemma~4.3.8]{brenner_scott}, and so it only remains to show that $\\Pi^p v$ satisfies the wave equation if $v$ does. For $p \\leq 1$ this is clear. For $p \\geq 2$, the result follows from the linearity of $\\Pi^p$, the fact that the wave equation contains only operators of second order, and the following property of averaged Taylor polynomials:\n\\[\nD^\\alpha \\Pi^p v = \\Pi^{p-|\\alpha|} D^\\alpha v, \\qquad |\\alpha| \\leq p.\n\\]\n\\end{proof}\n\nApplying such a projector to the exact solution and combining this with Lemma~\\ref{lemma:abstract_error_bound} gives us a proof of the convergence order of the discrete scheme.\n\n\\begin{theorem}\\label{thm:conv_order}\n Let the exact solution $u \\in \\mathcal{X}$ be such that for each space time element $K \\times I_n$, $u|_{K \\times I_n} \\in H^{s+1}(K \\times I_n)$ for some $0 \\leq s \\leq p$. \n Then\n\\begin{equation}\\label{eq:gen_error_bound}\n\\dgnorm{U-u} \\leq C\\left( \\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} (h_K^{(n)})^{2s-1} \\|u\\|^2_{H^{s+1}(K \\times I_n)}\\right)^{1\/2} \\leq C(\\reply{u}) h^{s-1\/2},\n\\end{equation}\nwhere $h = \\max_{K,n} h^{(n)}_K$ and \n\\[\nC(\\reply{u}) = \\left(\\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} \\|u\\|^2_{H^{s+1}(K \\times I_n)}\\right)^{1\/2}.\n\\]\n\\end{theorem}\n\n\n\n\n\n\n\n\n\n\\subsection{$hp$-version error analysis for $d=1$}\\label{sec:approx_one}\nAs we shall now show, the Trefftz basis is sufficient to deliver the expected $hp$-version a priori error bounds for $d=1$, along with a proof of the exponential convergence of the $p$-version space-time dG method for the case of analytic exact solutions. \\reply{See \\cite{KreMPS} for another $hp$-analysis in 1D of a different Trefftz based method.}\n\nTo discuss the Trefftz-basis case for $d=1$, we let $K = [x_0,x_1]$ and start from the basic observation that the exact solution to the wave equation on each space time element is of the form\n\\begin{equation}\\label{eq:exact_sol_form}\nu(x,t)|_{K\\times I_n} = F^1_{n,K}(a^{-1\/2}x+t)+F^2_{n,K}(a^{-1\/2}x-t),\n\\end{equation}\nwhere we can define $F^1$ and $F^2$ by\n\\[\nF^1_{n,K}(a^{-1\/2}x+t) = \\tfrac12 u(x,t)+\\tfrac12v(x,t), \\qquad\n(x,t) \\in K \\times I_n\n\\]\nand\n\\[\nF^2_{n,K}(a^{-1\/2}x-t) = \\tfrac12 u(x,t)-\\tfrac12 v(x,t), \\qquad\n(x,t) \\in K \\times I_n,\n\\]\nwhere\n\\[\nv(x,t) = a^{1\/2}\\int_{t_n}^t u_x(x,\\tau) d\\tau+a^{-1\/2}\\int_{x_0}^xu_t(x',t_n)dx'.\n\\]\nIt is not difficult to see that these are well-defined, i.e., that the right-hand sides indeed depend only on $a^{-1\/2}x\\pm t$ by virtue of satisfying the equations $a^{1\/2} f_x \\mp f_t = 0$ respectively.\n\n\nFor $\\hat{I}:=(-1,1)$, we define\nthe $H^1$-projection operator $\\hat{\\lambda}_p:H^1(\\hat{I})\\to\n\\mathcal{P}_p(\\hat{I})$, $p\\ge 1$, defined by\nsetting, for $\\hat{u}\\in H^1(\\hat{I})$,\n\\[(\\hat{\\lambda}_p\\hat{u})(x):=\\int_{-1}^{x}\\hat{\\pi}_{p-1}(\\hat{u}')(\\eta)\\,\\mathrm{d}\n\\eta +\\hat{u}(-1),\\qquad x\\in \\hat{I},\\] with $\\hat{\\pi}_{p-1}$\nbeing the $L^2$-orthogonal projection operator onto\n$\\mathcal{P}_{p-1}(\\hat{I})$. \n\nNow, upon considering the linear scalings $\\psi^1_{n,K}:\\hat{I}\\to J^1_{n,K}$, $K\\in\\mathcal{T}_{n}$, such that\n\\[\nJ^1_{n,K}:=( \\min_{(x,t)\\in K\\times I_n} \\{x+ct\\}, \\max_{(x,t)\\in K\\times I_n} \\{x+ct\\} ),\n\\]\nand $\\psi^2_{n,K}:\\hat{I}\\to J^2_{n,K}$, $K\\in\\mathcal{T}_{n}$, such that\n\\[\nJ^2_{n,K}:=( \\min_{(x,t)\\in K\\times I_n} \\{x-ct\\}, \\max_{(x,t)\\in K\\times I_n} \\{x-ct\\} ),\n\\]\nwe define the univariate space-time elemental projection operators $\\lambda^i_p$, $i=1,2$, piecewise by\n\\[\n(\\lambda^i_p F)|_{J^i_{n,K}} := \\hat{\\lambda}^i_p ((F\\circ \\psi^i_{n,K})|_{\\hat{I}}), \\quad K\\in\\mathcal{T}_{n},\\ n=0,1,\\dots, N-1.\n\\]\nUsing these, we can now define the \\emph{Trefftz projection} $\\Pi_p u$ of a function $u$ of the form \\eqref{eq:exact_sol_form} element-wise by\n\\begin{equation}\\label{trefftz_proj}\n(\\Pi_p u)|_{K\\times I_n} := \\lambda^1_p F^1_{n,K}(x+ct) + \\lambda^2_p F^2_{n,K}(x-ct),\n\\end{equation}\n$K\\in\\mathcal{T}_{n}$, $n=0,1,\\dots, N-1$. The approximation properties of $\\Pi_p$ follow from the respective properties of $\\lambda^i_p$, $i=1,2$. Space-time shape regularity implies $J^i_{n,K}\\sim h_K^{(n)}$, $i=1,2$. \n\nWe denote by $\\Phi(p,s)$ the quantity\n$\n \\Phi(p,s):=(\\Gamma(p-s+1)\/\\Gamma(p+s+1))^{\\frac{1}{2}},\n$\nwith $p,s$ real numbers such that $0\\le s\\le p$\nand $\\Gamma(\\cdot)$ being the Gamma function; we also adopt the standard convention\n$\\Gamma(1)=0!=1$. Making use of \\emph{Stirling's formula},\n$\\Gamma(n)\\sim\\sqrt{2\\pi}n^{n-\\frac{1}{2}}e^{-n}$, $n>0$,\nwe have, \n$\n \\Phi(p,s) \\le C p^{-s}\n$, for $p\\ge 1$,\nwith $0\\le s\\le p$ and $C>0$ constant depending only on $s$.\n\nWe have the following $hp$-approximation results for $\\lambda^i_p$, $i=1,2$.\n\n\\begin{lemma}\\label{approx_theorem}\nLet $v \\in H^{k+1}(J)$, for $k\\ge 1$, and let $h=\\diam(J)$ for \\reply{an open, bounded interval $J\\subset\\mathbb{R}$}; finally let $\\lambda_p$ be any of the $\\lambda^i_p$, $i=1,2$. Then the following error bounds hold:\n\n\\begin{equation}\\label{ltwobounis}\n \\ltwo{v - \\lambda_p v}{J} \\le Cp^{-1}\\Phi(p,s)h^{s+1}|v|_{s+1,J},\n\\end{equation}\nand\n\\begin{equation}\\label{dxbounis}\n \\ltwo{v' - (\\lambda_p v)'}{J} \\le C\\Phi(p,s)h^{s}|v|_{s+1,J},\n\\end{equation}\nwith $0\\le s\\le \\min\\{p,k\\}$, $p\\ge 1$. \nAlso, let $v\\in H^{k+1}(J)$, with $k\\ge 2$. Then, the following bound holds:\n\\begin{equation}\\label{htwo_bound}\n \\ltwo{v''- (\\lambda_p v)''}{J}\\le C p^{3\/2}\\Phi(p,m)h^{m-1}|v|_{m+1,J},\n\\end{equation}\nwith $1\\le m\\le \\min\\{p,k\\}$. Finally, let $v\\in H^{k+1}(J)$, with $k\\ge 3$. Then, the following bound holds:\n\\begin{equation}\\label{hthree_bound}\n \\ltwo{v'''- (\\lambda_p v)'''}{J}\\le C p^{7\/2}\\Phi(p,l)h^{l-2}|v|_{l+1,J},\n\\end{equation}\nwith $2\\le l\\le \\min\\{p-1,k\\}$.\n\\end{lemma}\n\\begin{proof}\n The proof \nof (\\ref{ltwobounis}) and (\\ref{dxbounis}) for the $H^1$-projection $\\lambda_p^i$ can be found, e.g., in \\cite{SchwabBook}. \nThe proof of \\eqref{htwo_bound} can be found in \\cite{GH}, while the proof of \\eqref{hthree_bound} follows along the same lines as in the proof of \\eqref{htwo_bound} from \\cite{GH}.\n\\end{proof}\n\nThese $hp$-approximation estimates imply the following bound.\n \n\\begin{theorem}\\label{approx_theorem_dg_norms}\nLet $u|_{K\\times I_n} \\in H^{k+1}(K\\times I_n)$, for $k\\ge 3$ be the exact solution to \\eqref{eq:wave}. Then, \\our{for space-time meshes satisfying Assumption \\ref{as:st_reg},} the following error\nbounds hold:\n\\begin{equation}\\label{eq:aprioribound_hp}\n\\dgnorm{U-u}^2 \\leq \\reply{C} p^{3} \\Phi^2 (p,s)\\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} \\our{ \\diam(K\\times I_n)}^{2s-1} |u|_{s+1,K\\times I_n}^2,\n\\end{equation}\nfor $3\\le s\\le \\min\\reply{\\{}p+1,k\\reply{\\}}$ and $h=\\max_{K,n}\\{ \\our{ \\diam(K\\times I_n)}\\}$, with $C>0$ constant, independent of $p$, $h$, \\reply{$u$, and of} $U$. Moreover, if $u$ is analytic on a neighbourhood of $\\Omega$, there exists $r>0$, depending on the analyticity region of $u$ \\reply{in a neighbourhood of $\\Omega\\times(0,T)$}, such that\n\\begin{equation}\\label{eq:aprioribound_hp_exponential}\n\\dgnorm{U-u}^2 \\leq C(u) p^{3} \\exp(-r p)\\sum_{n = 0}^{N-1} \\sum_{K\\in \\mathcal{T}^n} |K\\times I_n| \\our{\\diam(K\\times I_n)}^{2s-1}.\n\\end{equation} \n\\end{theorem}\n\n\\begin{proof}\nThe proof of \\eqref{eq:aprioribound_hp} follows by combining the $hp$-approximation bounds from \\eqref{approx_theorem} with Lemma \\ref{lemma:abstract_error_bound}.\n\nFor \\eqref{eq:aprioribound_hp_exponential}, we work as follows. Analyticity of $u$ implies that there exists a $d>0$, \\reply{such that for all $s\\ge 0$,}\n\\begin{equation}\\label{analyticity}\n|u|_{s,K\\times I_n} \\le C d^s\\Gamma(s+1)|K\\times I_n|^{1\/2},\n\\end{equation}\n\\reply{cf., e.g., \\cite[Theorem 1.9.3]{davis}}.\nUsing this \\eqref{analyticity}, setting $s=\\reply{\\gamma} p$ for some $0<\\reply{\\gamma}<1$, along with Stirling's formula, we can arrive to the bound\n\\[\n\\Phi^2 (p,\\gamma p) |u|_{\\gamma p+1,K\\times I_n}^2 \\le C \\bigg( (2\\gamma d)^{2\\gamma}\\frac{(1-\\gamma)^{1-\\gamma}}{(1+\\gamma)^{1+\\gamma}} \\bigg)^p|K\\times I_n|,\n\\]\nwith the precise choice of $\\gamma$ remaining at our disposal. The function \n\\[\nF(\\gamma) := (2\\gamma d)^{2\\gamma}\\frac{(1-\\gamma)^{1-\\gamma}}{(1+\\gamma)^{1+\\gamma}} ,\n\\]\nhas a minimum at $\\gamma_{\\min}:=(1+4d^2)^{-1\/2}$, giving $F(\\gamma_{\\min})<1$. Setting, now $r = 1\/2|\\log F(\\gamma_{\\min})|$, the result follows.\n\\end{proof}\n\n\\begin{remark}\nThe bound \\eqref{eq:aprioribound_hp} is suboptimal in $p$ by one order. This is a standard feature of $hp$-version dG methods whose analysis requires the use of $hp$-type inverse estimates. It is possible to slightly improve on this result and obtaining only $1\/2$ order $p$-suboptimal bounds, using the classical $hp$-approximation results from \\cite{Can_Quar,BS}, instead of the $H^1$-projection operator as done above. These results, however, are not suitable for the proof of the exponential rate of $p$-convergence. \n\\end{remark}\n\n\\section{Numerical experiments}\\label{sec:numerics} \\reply{We present a series of numerical experiments aiming to highlight the performance of the proposed method above. In each experiment, the spatial meshes are kept fixed $\\mathcal{T} = \\mathcal{T}_n$ and uniform time-step is used. In the one-dimensional ($d=1$) examples the spatial mesh is a uniform set of intervals, whereas for $d=2$, the spatial mesh is a quasiuniform triangulation. The resulting linear systems at each timestep are solved by standard sparse direct solvers.}\n\\subsection{Experiments in one dimension}\nWe consider the wave equation with constant diffusion coefficient $a\\equiv 1$, spatial domain $\\Omega = (0,1)$ and initial data \n\n\\begin{equation}\n \\label{eq:init_data} \nu(x,0) = e^{-\\left(\\frac{x-5\/8}{\\delta}\\right)^2}, \\qquad \\dot u(x,0) = 0,\n\\end{equation}\nwhere $\\delta \\leq \\delta_0 = 7.5 \\times 10^{-2}$. Note that the initial data is not exactly zero at the boundary, but is less than $10^{-11}$ in the range of parameter $\\delta$ that we consider. This slight incompatibility with the boundary condition does not influence in any visible way our numerical results. Since the energy of the exact solution stays constant it is given for all times by\n\\[\n\\text{exact energy} = \\tfrac12\\ltwo{u_x(x,0)}{\\Omega}^2 \\approx 2 \\delta^{-1}\\int_{-\\infty}^\\infty y^2 e^{-2y^2}dy = \\delta^{-1} \\frac{\\sqrt{\\pi}}{2\\sqrt{2}},\n\\]\nwhere the approximation in the second step is of the order of $10^{-11}$ for reasons given above and the final equality is obtained by using integration by parts to reduce it to the Gaussian integral \\cite{GraR2000}.\n\nAs the problem is in one spatial dimension, the exact solution is not difficult to obtain. The error will be computed in the dG norm \n\\[\n\\text{error } = \\dgnorm{u- u_h}.\n\\]\nSince the exact solution is smooth, note that, see \\eqref{eq:dg_norm_expr}, \n\\[\n\\dgnorm{u}^2 = a(u,u) = 2 \\times \\text{exact energy}.\n\\]\n\n\\subsubsection{Convergence order}\n\nWe first investigate the convergence order of the numerical method. Though we did not analysed full polynomial spaces, we also give numerical experiments for these as it is interesting to compare the two sets of results.\n\nIn this subsection, we choose $\\delta_0 = 7.5 \\times 10^{-2}$ and $T = 1\/4$. Note that we choose such a small time interval in order to reach the asymptotic regime earlier -- this will especially be important for lower orders. In Figure~\\ref{fig:conv} and Tables~\\ref{tab:conv_order} and \\ref{tab:linear_order}, the convergence curves and numerically computed convergence orders are given. These confirm the theoretical results. Note that the errors obtained by the full and the Trefftz spaces are very similar for the same order, but the Trefftz spaces require fewer degrees of freedom and cheaper implementation; see Remark~\\ref{rem:cheaper} and Figure~\\ref{fig:Conv_Time}. We have also found that higher order approximation converges without the two extra stabilisation terms, i.e., with $\\sigma_1 = \\sigma_2 = 0$, but with the piecewise linear functions it stagnates.\n\n\n\n\\begin{figure}[hbtp]\n \\centering\n\\includegraphics[scale=0.45]{convTreftz1d5c.pdf} \n\\includegraphics[scale=.45]{convPolyNew1d5c.pdf} \n\\caption{\\small Convergence of the Trefftz, on the left, and polynomial, on the right, time-space dG method of order $p$. The error is plotted against the uniform mesh width in time and space $h = T\/N$. }\n \\label{fig:conv}\n\\end{figure}\n\\begin{figure}[hbtp]\n\\centering\n\\includegraphics[scale=0.450]{TimeTreftz1d5c.pdf}\n\\includegraphics[scale=0.450]{PolyTime1d5c.pdf} \n\\caption{\\small Error against computational time for Trefftz (on the left) and polynomial spaces (on the right). The much lower times for Trefftz spaces are due both to the smaller number of degrees of freedom for the same accuracy and to the cheaper construction of matrices; see Remark~\\ref{rem:cheaper}.}\n\\label{fig:Conv_Time}\n\\end{figure}\n\n\n\n\\begin{figure}[hbtp]\n\\centering\n\\includegraphics[scale=.4]{Error_orderTt2c.pdf} \n\\caption{\\small Convergence of the Trefftz method with fixed mesh width $h=1\/40$ and increasing polynomial order $p$.}\n\\label{fig:Convp}\n\\end{figure}\n\n\n\n\n\\begin{table}\n \\centering\n \\begin{tabular}{c|cccc}\n $N$ & $p=2$ & $p=3$ & $p=4$ & $p=5$\\\\\\hline\n$5$ & $0.98$ & $1.85$ & $3.64$ & $5.07$\\\\\n$10$ & $1.37$ & $2.10$ & $3.57$ & $5.06$\\\\\n$20$ & $1.38$ & $2.28$ & $3.52$ & $4.77$\\\\\n$40$ & $1.46$ & $2.42$ & $3.51$ & $4.76$\\\\\n$80$ & $1.49$ & $2.51$ & $3.51$ & $4.63$ \n \\end{tabular}\n \\hspace{.8cm}\n \\begin{tabular}{c|cccc}\n$N$ & $p = 2$& $p = 3$ & $p=4$ & $p=5$\\\\\\hline\n5 & 0.90 & 1.85 & 3.74 & 5.56 \\\\\n10 & 1.17 & 2.11 & 3.39 & 5.05\\\\\n20 & 1.34 & 2.26 & 3.41 & 4.31\\\\\n40 & 1.44 & 2.38 & 3.41 & 4.91\\\\\n80 & 1.45 & 2.54 & 3.46 & 4.79\n\\end{tabular}\n \\caption{\\small Numerically obtained orders of convergence of the error in the dG norm $ \\dgnorm{\\cdot}$ for Trefftz spaces on the left and for polynomial space on the right}\n\\label{tab:conv_order}\n\n\\end{table}\n\n\n\n\n\n\n\\begin{table} \n\\centering\n\\begin{tabular}{| l | l | l | l | l | l | l | l | l |}\n\\hline\n$N$ & 80 & 160 & 320 & 640 & 1280 & 2560 & 5120 \\\\ \\hline\n$p = 1$ & 0.08 & 0.11 & 0.19 & 0.29 & 0.38 & 0.44 & 0.47 \\\\ \\hline\n\\end{tabular}\n\\caption{\\small Numerically obtained orders of convergence of the error in the dG norm $\\dgnorm{\\cdot}$ for linear elements.}\\label{tab:linear_order}\n\\end{table}\n\\subsubsection{Long-time energy behaviour}\n\nThe time-space dG method that we developed is dissipative, so we expect the energy to decay over time. However, if the accuracy of the approximation is high we expect this decay to be very slow. This is indeed reflected in the numerical experiments shown in Figure~\\ref{fig:energy_decaylog}, where we compute the energy\n\\[\nE(t) = \\tfrac12\\|\\dot u_h (t)\\|^2+\\tfrac12\\|\\nabla u_h (t)\\|^2\n\\]\nup-to time $T = 5$ with $\\delta = \\delta_0\/4$.\n\n\n\\begin{figure}[hbtp]\n\\centering\n\\includegraphics[scale=0.45]{semilogTreftzzc.pdf}\n\\includegraphics[scale=0.45]{semilogpolyyc.pdf}\n\\caption{\\small Plot of the energy $E(t) = \\tfrac12\\|\\dot u_h (t)\\|^2+\\tfrac12\\|\\nabla u_h (t)\\|^2$ against time for the Trefftz spaces on the left and polynomial spaces on the right.\n\\label{fig:energy_decaylog}\n\\end{figure}\n\n\n\n\n\n\\subsubsection{Waves with energy at high-frequences}\n\nNote that if we decrease the parameter $\\delta > 0$ in the definition of the initial data \\eqref{eq:init_data}, the Gaussian becomes narrower and energy at higher frequences is excited. In the following set of experiments we investigate the error while decreasing both $\\delta > 0$ and the mesh-width $h > 0$. In an ideal scenario, $h \\propto \\delta$ would be sufficient to obtain a constant relative error which we define as\n\\begin{equation}\n \\label{eq:error_delta} \n\\text{error}_\\delta = \\left(\\frac\\delta2\\ltwo{\\dot u(\\cdot,T)-\\dot u_h(\\cdot,T^-)}{\\Omega}^2+\\frac\\delta2\\ltwo{\\nabla u(\\cdot,T)-\\nabla u_h(\\cdot,T^-)}{\\Omega}^2\\right)^{1\/2}.\n\\end{equation}\nThe results given in Figure~\\ref{fig:error_delta} show that already for $p = 3$ the performance is good and for larger $p$ for this range of $\\delta$, the error does not visibly change for different $\\delta$ as long as $h \\propto \\delta$.\n\n\\begin{figure}[hbtp]\n\\centering\n\\includegraphics[scale=0.45]{scaledErr_Trefftz5c.pdf} \n\\caption{\\small The plot of the scaled error see \\eqref{eq:error_delta}, against $h\/\\delta$, for Trefftz space.The final time is chosen to be $T=1$.\n\\label{fig:error_delta}}\n\\end{figure}\n\n\n\\subsection{Experiments in two dimensions}\n\nWe conclude the section on numerical experiments by considering the wave equation \n\\[\n\\ddot u -\\Delta u = 0\n\\]\non the square $[0,1]^2 \\subset \\mathbb{R}^2$ with homogeneous Dirichlet boundary condition and initial data\n\\[\nu(x,y,0) = \\sin \\pi x \\sin \\pi y, \\qquad \\dot u(\\cdot, 0) = 0.\n\\]\nThe analytical solution is given by\n\\[\nu(x,y,t) = \\cos(\\sqrt{2}\\pi t) \\sin \\pi x \\sin \\pi y.\n\\]\nWe investigate the convergence of the error in the energy norm at the final time-step\n\\begin{equation}\n \\label{eq:2d_error}\n\\text{error} = \\left(\\tfrac12\\ltwo{\\dot u(\\cdot,T)-\\dot u_h(\\cdot,T^-)}{\\Omega}^2+\\tfrac12\\ltwo{\\nabla u(\\cdot,T)-\\nabla u_h(\\cdot,T^-)}{\\Omega}^2\\right)^{1\/2}. \n\\end{equation}\nThe convergence plots are given in Figure~\\ref{fig:2d_energyconv} and the computed convergence orders in Table~\\ref{tab:2d_convorder}. Note that, \\reply{for the weaker error notion \\eqref{eq:2d_error},} we do not lose half an order of convergence as when computing the error in the discrete norm $\\dgnorm{\\cdot}$. The theory presented above, does not predict this behaviour. The observed rate of convergence is not, however, surprising as, unlike the dG norm, this error measure does not accumulate the errors over all time-steps.\n\n\\begin{figure}\n \\centering\n\\includegraphics[width=.4\\textwidth]{EnergyErrT2New2c.pdf}\n\\includegraphics[width=.4\\textwidth]{EnergyErrPolyNew2D.pdf} \n \\caption{\\small Convergence of the error \\eqref{eq:2d_error} at the final time for Trefftz basis on the left and full polynomial basis on the right.}\n \\label{fig:2d_energyconv}\n\\end{figure}\n\n\n\\begin{table}[hbtp]\n \\centering\n \\begin{tabular}{c|cccc}\n $N$ & $p=1$ & $p=2$ & $p=3$ & $p=4$\\\\\\hline\n$10$ &$0.046$ & $2.039$ & $2.219$ & $3.935$ \\\\\n$20$ &$0.115$ & $1.990$ & $2.539$ & $3.977$ \\\\\n$40$ &$0.160$ & $1.979$ & $2.819$ & $3.996$ \\\\\n \\end{tabular}\n \\hspace{.8cm}\n \\begin{tabular}{c|cccc}\n$N$ & $p=1$ & $p = 2$& $p = 3$ & $p=4$ \\\\\\hline\n10 & 0.046 & 1.897 & 2.133 & 3.956 \\\\\n20 & 0.115 &1.896 & 2.248 & 3.967\\\\\n40 & 0.160 & 1.935 & 2.612 & 3.982 \\\\\n\\end{tabular}\n\\caption{\\small Numerically obtained convergence orders of the error \\eqref{eq:2d_error} at the final time for Trefftz on the left and for the full polynomial space on the right. \\label{tab:2d_convorder}}\\vspace{-.5cm}\n\\end{table}\n\\FloatBarrier\n\n\n\\def$'${$'$}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\n\nDuring the last decade, there has been a major interest in using nonlinearity\nfor achieving non-reciprocal transmission, aiming at designing efficient wave\ndiodes in particular with applications within the optical domain. The basic\nidea, that transmission between two waveguides with intensity-dependent (Kerr)\nrefractive index and different propagation constants becomes asymmetric in the\nnonlinear regime, was probably first put forward by Trillo and Wabnitz\n\\cite{TW86}. A similar mechanism was later analyzed for a different setup\nby Lepri and Casati \\cite{11,lepri}, who considered the nonreciprocal\ntransmission through\na layered photonic (or phononic) system, with a small central segment of\nnonlinear, nonmirror symmetric layers embedded in an infinite linear lattice.\nIn both cases, the systems were modeled using a discrete nonlinear\nSchr{\\\"o}dinger (DNLS) equation with cubic on-site nonlinearity, with\nparticular focus\non the case with two nonlinear sites (DNLS dimer) which can be solved exactly.\nAs is well known \\cite{DLS86,WS,btm}, stationary transmission through DNLS\nchains with\non-site nonlinearity generically exhibits multistability and hysteresis\neffects when using {\\em input} intensity $|R_0|^2$ as independent parameter,\nwhile the\nexistence of a backward transfer map guarantees that the stationary\ntransmission\ncoefficient is a single-valued function of the {\\em output} intensity $|T|^2$ .\n\n\nLater, in the context of asymmetric transmission of signals through\nnon-linear asymmetric dimer layers, it was shown that multistability could be\nenhanced by weak saturation of the (cubic) on-site nonlinearity;\n this favors the nonreciprocal transmission and also yields opposite effects\nof the rectifying action for short\/long wavelength signals\n\\cite{assuncao,Erik}.\nA similar study was carried out for saturable nonlinear oligomer DNLS segments\n($N=1,2,3$)\nembedded in a linear Schr{\\\"o}dinger chain \\cite{jd}. Other relevant works\nconcern the asymmetric wave transmission through oligomers with cubic-quintic\non-site nonlinearity \\cite{wasay18}, and the enhancement of the non-reciprocal\ntransmission under saturable cubic-quintic nonlinear responses for\ndimers \\cite{wasay3}.\n A cubic on-site nonlinearity was also shown to yield\nnon-reciprocal transmission if combined with an asymmetric geometric shape of\nthe nonlinear part \\cite{LiRen}, and moreover, for a system with two nonlinear\nsites separated by a number of linear sites, the transmission was shown to\nbe generically asymmetric unless certain resonance conditions were fulfilled\n\\cite{RenPRB}\n(analogous resonance conditions were also obtained for the continuous\nSchr{\\\"o}dinger equation with nonlinear $\\delta$-function scatterers\n\\cite{RenPRB,RenPRE})\n\nA common feature of the above mentioned earlier works is, that the nonlinearity\n(cubic, cubic-quintic or saturable) resided only in the on-site terms, which\nsimplifies the analytical as well as the numerical treatment due to the\nexistence of a unique backward transfer map, which thus never yields more than\none solution for a given output $|T|$. However, although on-site nonlinearities\ntypically dominate in most physical applications of DNLS lattices, there are\ncertain situations where the additional effects of inter-site nonlinearities\nmay be important, e.g., for optical waveguides embedded in a nonlinear medium\n\\cite{Oster03}, Bose-Einstein condensates in optical lattices \\cite{ST03}\n(dipolar condensates in particular \\cite{Serbia,Chile}), or,\nmore generally, when the DNLS equation is considered as a rotating-wave type\napproximation of anharmonically coupled oscillators \\cite{MJ06}, or as a\ntight-binding approximation of the nonlinear Schr{\\\"o}dinger equation with\nspatial periodicity in both the linear potential and nonlinearity\ncoefficient \\cite{Abd08}. It is thus also of interest to investigate, whether\nthe presence of a non-negligible inter-site nonlinearity in the central\nsegment may have any major\nqualitative effects on the non-reciprocal wave transmission. A first step in\nthis direction was taken in \\cite{wasay2}, where transmission through an\nasymmetric DNLS dimer with cubic on-site as well as inter-site nonlinearity was\nstudied for a special situation, assuming a particular relation between the\ncomplex amplitudes of the two dimer sites, that allowed the derivation of\na unique backward transfer map and thus a unique solution for a given $|T|$.\nHowever, as we will show in the present work, this is {\\em not} the case for\nthe\ngeneric situation in presence of inter-site nonlinearities.\n\n\nIn this work, we generalize the model introduced in \\cite{wasay2} to have a\n{\\em saturable inter-site} nonlinearity between the two dimer sites, leaving\nthe on-site nonlinearity cubic.\nAs we will see, due to the absence of a unique backward transfer map,\na small inter-site saturability typically yields {\\em more\nthan one solution} in the regime of small $|T|$.\nThese solutions are distinguished by\ntheir different relative phases between the dimer sites, and may be obtained\nnumerically by solving an additional equation for this phase difference.\nMost importantly, the general distinctive feature of this work in view of all\nprevious works is that we will present the scenario of how a gradual\ntransition from the non-saturated to saturated case takes place, i.e., to\nanalyse in detail how the saturated inter-site case connects to the\nnon-saturated inter-site case.\n\nAlthough we consider here a specific form of\nsaturable inter-site nonlinearities, appropriate e.g. for\nphotvoltaic-photorefractive materials \\cite{Valley94},\nthe method that we present should be\napplicable for transmission through generic inter-site nonlinear dimer\nsegments. Notably, a somewhat different form of saturable nonlinear\ncoupling within a dimer was recently proposed \\cite{Hadad17} and\nimplemented through an electric circuit ladder \\cite{Hadad18}.\n\nThe outline of this paper is as follows. In Sec.\\ \\ref{sec:Model} we introduce\nthe dynamical model and set up the corresponding stationary transmission\nproblem. We derive the corresponding backward transfer map, point out the\nreason for its general non-uniqueness, and analyze its solutions\nanalytically in some limiting cases. In Sec.\\ \\ref{sec:mtc} we investigate\nin more detail, by numerical means, the transitions between regimes\nwith two, three, or one distinct solutions of the backward transfer map,\nfor increasing saturation strength. Results for the multi-channel\nstationary transmission coefficients\nas a function of wave number and transmitted intensity, for given parameter\nvalues and varying saturation strength, are reported in\nSec.\\ \\ref{sec:transmission}. The asymmetric stationary transmission\nproperties are investigated in Sec.\\ \\ref{sec:asymmetric}, where also the\nrectification factor is calculated in various regimes of saturability for\nthe different solution branches. Section \\ref{sec:stability} reports\nthe linear stability analysis of the different branches of stationary\nscattering solutions, with illustrations of instability-induced dynamics.\nIn Sec.\\ \\ref{sec:Gaussian} we perform dynamical simulations with\nGaussian wavepackets and discuss the transmission and rectification\nproperties. Concluding remarks are made in Sec.\\ \\ref{sec:conclusions}, and\nsome results for different parameter values than those used in the\nmain paper are shown in Appendix.\n\n \\section{Model}\n\\label{sec:Model}\n We introduce the dynamical equation of the model as follows,\n\n\n\n \\bea{}\n i\\frac{dA_n}{dt}\\!=\\!V_nA_n\\!-\\!C\\!\\left(A_{n+1}\\!+\\!A_{n-1}\\right)\\!+\\!\\gamma_n|A_n|^2A_n\\!+\\!\n\\left(\\!\\frac{\\epsilon_{n}|A_{n+1}|^2}{1\\!+\\!\\beta|A_{n+1}|^2|A_n|^2}\\!+\\!\\frac{\\epsilon_{n-1}|A_{n-1}|^2}{1\\!+\\!\\beta|A_{n-1}|^2|A_n|^2}\\!\\right)\\!A_n .\n \\label{dynamical}\n \\end{eqnarray}\nIn Eq.\\ \\eqref{dynamical}, $n$ is the lattice site counter,\n$A_n$ is the amplitude at site $n$, and $V_n$ is the linear on-site energy of\neach\nsite inside the one-dimensional lattice. The parameter $\\gamma_n$ determines\nthe strength of the local nonlinearity,\nwhich we take to have a standard cubic (Kerr) form, while\n$\\epsilon_n$ represents the nonlocal (inter-site) saturable nonlinearity.\nWe saturate only the inter-site nonlinearity as the effect of saturating the\non-site cubic nonlinearity has been addressed in earlier work\n\\cite{jd,assuncao,wasay3,Erik}. $\\beta$ is the saturation parameter;\nin the unsaturated limit $\\beta =0$ we recover the DNLS model with\ncubic inter-site\nnonlinearity studied in \\cite{wasay2} (relevant e.g.\\ for dipolar Bose-Einstein\ncondensates \\cite{Chile}), while in the strongly saturated limit\n$\\beta \\rightarrow \\infty$ the coupling becomes governed only by the linear\ncoupling constant $C$, and the model reduces to the standard cubic on-site\nDNLS model \\cite{11,lepri}.\nLike the standard DNLS model \\cite{EJ03}, the system is Hamiltonian,\nwith the saturable inter-site terms arising from additional terms\n$\\frac{\\epsilon_n}{\\beta} \\ln \\left(1+\\beta|A_n|^2|A_{n+1}|^2\\right)$\nin the Hamiltonian.\nWithout loss of generality, the parameter $C$\nwill be chosen to be unity. Focusing our attention on a dimer\nsituated at lattice sites 1 and 2 with nonlinear inter-site interactions\nonly between the two dimer sites, the site\ndependent parameters $\\gamma$ and $V$ have non-zero\ncontributions only in the\nregion $1\\leq n\\leq2$, and $\\epsilon$ only for $n=1$.\nThis means that waves can propagate freely outside the dimer.\n\nThe set of dynamical equations \\eqref{dynamical} has stationary solutions of\nthe form $A_n(t)=A_ne^{-i\\omega t}$.\nWhen a signal (incoming or outgoing wave) is away from the dimer, the system\nis linear, and these solutions satisfy the dispersion relation\n$\\omega=-2$cos$k$, with $k$ being the wave vector of some specific harmonic\ncomponent of the wave and $0\\leq k\\leq\\pi$. These solutions render\nEq.\\ \\eqref{dynamical} stationary. The resulting stationary equation can be\nwritten\nin the form of a backward-map analogous to \\cite{11,btm},\n \\bea{}\nA_{n-1}=-A_{n+1}+\\left(V_n-\\omega+\\gamma_n|A_n|^2+\\frac{\\epsilon_{n}|A_{n+1}|^2}{1+\\beta|A_{n+1}|^2|A_n|^2}+\\frac{\\epsilon_{n-1}|A_{n-1}|^2}{1+\\beta|A_{n-1}|^2|A_n|^2}\\right)A_n .\n\\label{stationary}\n \\end{eqnarray}\nIn the absence of inter-site nonlinearities ($\\epsilon_n \\equiv 0$), this\nrelation allows one to immediately\nconstruct the amplitudes by a backward iteration, assuming that the solution\nis known at $n\\rightarrow \\infty$. By contrast, with nonzero $\\epsilon_1$\nan additional relation between the complex amplitudes\n$A_1$ and $A_2$ at the nonlinear dimer sites is needed.\n We will focus on the scattering properties of plane wave solutions of the\nfollowing form,\n\\bea{}\nA_n=\n\\Bigg\\{\n \\begin{array}{c}\n R_0 e^{ikn}+Re^{-ikn} \\qquad n\\leq 1\n \\\\\n Te^{ikn} ~~\\qquad\\qquad\\qquad n\\geq 2 \\\\\n \\end{array} ,\n \\label{planewave}\n\\end{eqnarray}\n where $R_0$, $R$ and $T$ are the amplitudes of incoming, reflected and\ntransmitted wave, respectively. Applying the ansatz in Eq.\\ \\eqref{planewave}\nsite-by-site, we get at site $n=0$,\n \\bea{}\n A_0=R_0+R ,\n \\label{site0}\n \\end{eqnarray}\n and at site $n=1$,\n \\bea{}\n A_1=R_0e^{ik}+Re^{-ik} .\n \\label{site1}\n \\end{eqnarray}\n With $A_0$ and $A_1$, the amplitudes of the reflected and incident waves can\nbe computed as\n\\bea{}\nR=\\frac{A_0 e^{ik}-A_1}{e^{ik}-e^{-ik}} ,\n\\label{R}\n\\end{eqnarray}\nand\n\\bea{}\nR_0=\\frac{A_0 e^{-ik}-A_1}{e^{-ik}-e^{ik}} .\n\\label{R0}\n\\end{eqnarray}\n\n We can rewrite the backward map \\eqref{stationary} for the dimer\n($n=2$), with the inter-site nonlinear interactions considered only between\nthe two dimer sites, as\n\\bea{}\nA_1=-A_3+\\left(V_2-\\omega+\\gamma_2|A_2|^2+\\frac{\\epsilon_1|A_{1}|^2}{1+\\beta|A_{1}|^2|A_2|^2}\\right)A_2 .\n\\label{n2}\n\\end{eqnarray}\nWith Eq.\\ \\eqref{planewave}, the wave amplitudes at the dimer interface\nfor the outgoing, right-propagating waves ($k>0$) is\n$A_2=Te^{2ik}$ and $A_3=Te^{3ik}$. In addition, we may obtain an expression for\n$|A_1|^2$ from the general current conservation law for stationary solutions,\n\\bea{}\n\\textmd{Im}[A_n^\\ast A_{n+1}]=|T|^2 \\sin k,\n\\label{cl}\n\\end{eqnarray}\nfor all $n$.\nWithout loss of generality, we may choose the arbitrary overall phase\nsuch that the amplitude $A_1$ at site 1 is real.\nFrom \\eqref{cl} with $n=1$ and \\eqref{planewave} with $n=2$ it then follows\nstraightforwardly that $A_1 \\textmd{Im}(Te^{2ik}) = |T|^2 \\sin k$, i.e.,\n\\bea{}\n|A_1|^2=\\frac{|T|^4\\textmd{sin}^2k}{[\\textmd{Im}(Te^{2ik})]^2} .\n\\label{f1}\n\\end{eqnarray}\nThe fact that $T$ is not real in general then leads to the following relation,\n\\bea{}\n|A_1|^2=\\frac{|T|^2\\sin^2k}{[\\sin(2k+\\varphi)]^2},\n\\end{eqnarray}\nwhere $\\varphi=\\textmd{arg}(T)$. Thus, Eq.\\ \\eqref{n2} becomes\n\\bea{}\nA_1=-Te^{3ik}+\\left(V_2-\\omega+\\gamma_2|T|^2+\\frac{\\epsilon_1|T|^2\\textmd{sin}^2k}{\\left[\\textmd{sin}(2k+\\textmd{arg}(T))\\right]^2+\\beta|T|^4\\textmd{sin}^2k}\\right)Te^{2ik} ,\n\\label{n3}\n\\end{eqnarray}\nwhich can be re-written as\n \\bea{}\n A_1=Te^{2ik}(\\delta_2-e^{ik}) ,\n \\label{n5}\n \\end{eqnarray}\n with $\\delta_2=V_2-\\omega+\\gamma_2|T|^2+\\frac{\\epsilon_1|T|^2\\textmd{sin}^2k}{\\left[\\textmd{sin}(2k+\\textmd{arg}(T))\\right]^2+\\beta|T|^4\\textmd{sin}^2k}$.\n\n Now in a similar way, for $n=1$ with the nonlinear inter-site interactions\nonly between the two dimer sites, from Eq.\\eqref{stationary} we get\n\\bea{}\nA_0=-A_2+\\left(V_1-\\omega+\\gamma_1|A_1|^2+\\frac{\\epsilon_1|A_{2}|^2}{1+\\beta|A_1|^2|A_{2}|^2}\\right)A_1 ,\n\\label{n21}\n\\end{eqnarray}\nwhich together with Eq.\\eqref{n5} leads to\n\\bea{}\nA_0=-Te^{2ik}+\\left(V_1-\\omega+\\gamma_1|T|^2|\\delta_2-e^{ik}|^2+\\frac{\\epsilon_1|T|^2}{1+\\beta|T|^4|\\delta_2-e^{ik}|^2}\\right)\nTe^{2ik}(\\delta_2-e^{ik}) ,\n\\label{n31}\n\\end{eqnarray}\nwhich can be rewritten as\n\\bea{}\nA_0=Te^{2ik}\\left[\\delta_1(\\delta_2-e^{ik})-1\\right] ,\n\\label{n6}\n\\end{eqnarray}\nwith $\\delta_1=V_1-\\omega+\\gamma_1|T|^2|\\delta_2-e^{ik}|^2+\\frac{\\epsilon_1|T|^2}{1+\\beta|T|^4|\\delta_2-e^{ik}|^2}$.\n\n This implies that the transmission coefficient $t(k,|T|^2; \\arg(T))$ can now\nbe computed by using Eq.\\ \\eqref{n6} and Eq.\\ \\eqref{n5} in Eq.\\ \\eqref{R0}.\nThe result is\n\\bea{}\nt(k,|T|^2;\\arg(T))=\\frac{|T|^2}{|R_0|^2}=\\left|\\frac{e^{-ik}-e^{ik}}{(\\delta_2-e^{ik})(\\delta_1-e^{ik})-1}\\right|^2 .\n\\label{t}\n\\end{eqnarray}\n For the left-propagating waves (with $k<0$), a similar computation yields\nthe transmission coefficients, i.e., we only need to exchange the\nsubscripts 1 \\& 2.\n\nNote that, in contrast to previously studied DNLS-type transmission problems\n(e.g., \\cite{11,lepri,DLS86,WS,btm,assuncao,Erik,jd,wasay18,wasay3,LiRen,RenPRB}),\nEq.\\ \\eqref{t} does {\\em not} necessarily determine the transmission\ncoefficient for a plane wave of wave vector $k$ as a unique function of\nthe transmitted intensity $|T|^2$, since in presence of intersite\nnonlinearities, there may be multiple solution\nbranches $i$ corresponding to the same $|T|^2$ but with different phases\n$\\varphi_i\\equiv \\arg(T)$. Since Eq.\\ \\eqref{n3} was obtained by assuming\n$A_1$ real,\nthe interpretation of the quantity ``$\\arg(T)$\" is an additional phase shift\nbetween the two dimer sites 1 and 2, due to the internal properties of the\ndimer. The computation of this additional phase factor $\\arg(T)$ is\nnontrivial. Imposing the \"reality'' assumption on $A_1$ by putting the\nimaginary part of the right-hand side of Eq.\\ \\eqref{n3} to zero,\nleads to the following equation,\n \\bea{}\n \\frac{\\sin\\left[3k+\\arg(T)\\right]}{\\sin\\left[2k+\\arg(T)\\right]}=V_2-\\omega+\\gamma_2|T|^2+\\frac{\\epsilon_1|T|^2\\sin^2k}{\\left[\\sin(2k+\\arg(T))\\right]^2+\\beta|T|^4\\sin^2k}.\n \\label{argT}\n \\end{eqnarray}\nSolving Eq.\\eqref{argT} analytically for $\\arg(T)=\\varphi_i(|T|,k)$ is\nnontrivial in the general case, but we may immediately note that adding\nany multiple of $\\pi$ to a solution gives another solution, so we may restrict\nto the interval $0\\leq \\varphi < \\pi$ (adding $\\pi$ just switches an overall\nsign).\nFor the case with pure on-site nonlinearity ($\\epsilon_1=0$), we recover the\nunique solution\n \\bea{}\n \\varphi_{\\epsilon_1=0}(|T|,k) = -2k + \\arctan\\left[\\frac{\\sin k}\n{V_2+\\cos k+\\gamma_2|T|^2}\\right].\n \\label{argT1}\n \\end{eqnarray}\nNote that in the linear limit ($|T|\\to 0$) and non-scattering case\n($V_2 = 0$), Eq.\\ \\eqref{argT1} yields\n$\\arg(T)=-k$ (due to the choice of origin in \\eqref{planewave}).\n\nWith unsaturated inter-site nonlinearity ($\\epsilon_1\\neq 0$ but $\\beta=0$),\nEq.\\ \\eqref{argT} can be written as a quadratic equation for\n$y\\equiv \\sin^2(2k+\\varphi)$:\n \\bea{}\n y^2(e^2+\\sin^2k)+y (2e \\epsilon_1|T|^2-1) \\sin^2k + \\epsilon_1^2|T|^4 \\sin^4k = 0,\n \\label{quadratic}\n \\end{eqnarray}\nwhere $e\\equiv V_2+\\cos k + \\gamma_2 |T|^2$.\nThus, it is clear from \\eqref{quadratic} that for unsaturated inter-site\nnonlinearities\nthere are generally {\\em two distinct\nsolutions} for {\\em small} $|T|$, and {\\em no} solutions for {\\em large} $|T|$.\nFor small $|T|$ we may express the solutions to $O(|T|^4)$ as\n\\bea{}\n\\varphi_1 \\simeq -2k + \\arctan\\left[\\frac{\\sin k}{V_2+\\cos k}\n\\left\\{1-\\frac{\\gamma_2+\\epsilon_1[(V_2+\\cos k)^2+\\sin^2k]} {V_2+\\cos k}|T|^2\n\\right\\}\n\\right],\n \\label{unsat1}\n \\end{eqnarray}\nand\n\\bea{}\n\\varphi_2 \\simeq -2k ,\n \\label{unsat2}\n \\end{eqnarray}\nrespectively. Thus we note that the solution $\\varphi_1$ in \\eqref{unsat1}\ncoincides with the small-$|T|$ limit of the pure on-site solution \\eqref{argT1}\nwhen $\\epsilon_1 \\rightarrow 0$, while the solution $\\varphi_2$ in\n\\eqref{unsat2} yields a new possible transmission channel not existing for\npure on-site nonlinearity (the existence of this additional channel was suppressed in \\cite{wasay2} due to the choice of a specific relation between the complex amplitudes of the dimer sites).\n\nFor the general case with saturable inter-site nonlinearity\n($\\beta \\neq 0$), Eq.\\ \\eqref{argT} instead becomes a cubic equation for $y$\n($0\\leq y \\leq 1$),\n \\bea{}\n(y+\\beta |T|^4\\sin^2 k)^2 (1-y) \\sin^2 k = y\n\\left[e(y+\\beta|T|^4 \\sin^2 k)+\\epsilon_1|T|^2 \\sin^2 k \\right]^2 .\n \\label{cubic}\n \\end{eqnarray}\nThus, depending on the parameter values, there are {\\em either one or three}\ndistinct solutions $\\varphi_i$, corresponding to different possible\ntransmission channels.\n By analyzing the coefficients in \\eqref{cubic}, we find that in the limit of\nsmall $|T|$ there is a transition at $\\beta\/\\epsilon_1^2 =1\/4$, so that for\n$\\beta\/\\epsilon_1^2 > 1\/4$ there is only one real and positive solution for\n$y$,\ncorresponding to\nthe phase factor $\\varphi_1$ in \\eqref{unsat1} for the unsaturated case.\nOn the other hand, for $\\beta\/\\epsilon_1^2 < 1\/4$ two additional solutions\nappear, both originating from the solution $\\varphi_2$ in \\eqref{unsat2}\nfor the unsaturated\ncase, with corrections of order $|T|^4$ and higher. Below,\nthe value $\\beta\/\\epsilon_1^2 = 1\/4$ will be taken as indicating the\ntransition between regimes of ``low saturation'' and ``medium saturation''.\n\n\nMoreover, in the limit of large $|T|$, $y=0$ is the only real solution,\nthus yielding a single channel with phase factor $\\varphi_2$ given by \\eqref{unsat2}. Note that this agrees also with the large-$|T|$ limit of the pure on-site\nsolution \\eqref{argT1}, as it should since the coupling becomes effectively\nlinear due to strong saturation.\nFor general nonzero $|T|$, the phase factor $\\varphi_i(|T|,k)$ is computed\nnumerically,\nand we will illustrate the typical scenario for different regimes\nof saturability in the following section. As we will see, there are\nsignificant regimes with three distinct channels for small and intermediate\nvalues\nof $|T|$ when $\\beta$ is not too large.\n\n\\section{Multiple transmission channels}\n\\label{sec:mtc}\n\n\nAs described above, one of our goals is to investigate how the saturated case\nconnects to the non-saturated case, which hinges on the detailed investigation\nof scenarios occurring at different levels of saturation. The analysis is thus\ndivided into\nthree distinct saturation regimes with carefully chosen representative\nsaturation values. To be specific, we fix the value of $\\epsilon_1$ to\n$\\epsilon_1=0.5$, consider\nan ``ultra-low saturation'' regime for\n$\\beta=0.01$ (i.e., $\\beta\/\\epsilon_1^2 =0.04 \\ll 1\/4$), a\nlow saturation regime for $\\beta=0.05$\n(i.e., $\\beta\/\\epsilon_1^2 =0.2 < 1\/4$), and a medium saturation\nregime $\\beta=0.5$ (i.e., $\\beta\/\\epsilon_1^2 =2 > 1\/4$) (the regime\nof stronger saturations is less interesting since it essentially reproduces\nwell known results for pure on-site nonlinearity \\cite{11,lepri}).\nUnless otherwise noted, we will also fix the on-site nonlinearity strength\non the dimer symmetric as $\\gamma_1=\\gamma_2=1$, and express the asymmetric\non-site potential as $V_{1,2}=V^{(0)}(1\\pm\\varepsilon_V)$, with specifically\nchosen $V^{(0)}=-2.50$ and $\\varepsilon_V=0.05$\n(some results for different values\nof $\\varepsilon_V, V^{(0)}$ are discussed in Appendix \\ref{AppB}).\n\n\n\n \\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.23\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnContourB00T5new.jpg}\n \n \\end{minipage}\n \n \\begin{minipage}[h]{0.23\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnContourB01T5new.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.23\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnContourB05T5new.jpg}\n \n \\end{minipage}\n \n \\begin{minipage}[h]{0.23\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnContourB50T5new.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.23\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnContourB00T1new.jpg}\n \n \\end{minipage}\n \n \\begin{minipage}[h]{0.23\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnContourB01T1new.jpg}\n \n \\end{minipage}\n \n \\begin{minipage}[h]{0.23\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnContourB05T1new.jpg}\n \n \\end{minipage}\n \n \\begin{minipage}[h]{0.23\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnContourB50T1new.jpg}\n \n \\end{minipage}\n \\caption{Contour plot of solutions of Eq.\\eqref{argT} as a function of $k$\nand $\\arg(T)=\\varphi_i(|T|,k)$ for $V_2=-2.3750$, $\\gamma_2=1$ and\n$\\epsilon_1=0.5$. Upper row: $|T|=0.5$;\nlower row: $|T|=1$. Columns from\nleft to right: $\\beta=0$, $\\beta=0.01$, $\\beta=0.05$, $\\beta=0.5$. }\n \\label{fargTb0}\n \\end{figure}\nThe solutions to Eq.\\ \\eqref{argT} for two distinct nonzero\n$|T|$ values ($|T|$=0.5 and $|T|$=1) in the unsaturated and the three\nsaturation regimes are illustrated in Fig.\\ \\ref{fargTb0} for $0\\leq k\\leq\\pi$\nversus $0\\leq\\varphi_i(|T|,k)\\leq\\pi$. The ''dotted'' lines in these\nfigures represent the singularity in the left-hand side of \\eqref{argT}\nat $y=0$ ($\\varphi = -2k \\mod \\pi$), which lies very close to the actual\nsolution for some cases.\nIn Fig.\\ \\ref{multisols}, the corresponding solutions ($\\varphi_i(|T|,k)$) are\npresented as a function of $|T|$ for various (fixed) values of $k$.\n\nFirstly, for the non-saturated case ($\\beta=0$, left columns in\nFigs.\\ \\ref{fargTb0}-\\ref{multisols}), as predicted from \\eqref{quadratic}\nthere is a two-solution regime which exists for all $k$ for small $|T|$,\nand no valid solutions for higher $|T|$ above a certain cut-off, which differs\nslightly for different $k$.\nFor the chosen set of parameter values, in the case of relatively small\n$k\\leq1.4$ this cut-off value is approximately $|T|=1.2$,\nand slightly increases for larger $k$ values, i.e., for $2.8\\leq k\\leq\\pi$, the cut-off is at $|T|=1.8$ approximately.\nThus, there are either two or zero transmission channels in the case of zero\nsaturation.\n \\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB00K02new.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB01K02.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB05K02.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB50K02new.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB00K15new.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB01K15new1.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB05K15.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB50K15new.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB00K25new.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB01K25.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB05K25.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.24\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SolnsB50K25new.jpg}\n \n \\end{minipage}\n \\caption{Plots of $\\varphi_i(|T|,k)$ as a function of $|T|$ with three fixed\n values of $k$: $k=0.2$ (upper row), $k=1.5$\n (middle row), $k=2.5$\n (bottom row). Columns from left to right:\n unsaturated case ($\\beta=0$),\nultra-low ($\\beta=0.01$), low ($\\beta=0.05$), and medium saturation\n($\\beta=0.5$) strengths. All other parameter values as before. Blue, orange\nand green curves correspond to the first, second and third solution branch,\nrespectively.}\n\\label{multisols}\n \\end{figure}\n\n As soon as we switch from the unsaturated to the ultra-low saturation\n(second column in Figs.\\ \\ref{fargTb0}-\\ref{multisols}),\na third solution immediately appears in the small-$|T|$ solution regime,\nas predicted from \\eqref{cubic}. Note that this additional solution\n(green curve in Fig.\\ \\ref{multisols}) as expected almost coincides with the\n``singularity line'' $\\varphi = -2k \\mod \\pi$ in Fig.\\ \\ref{fargTb0}.\nAbove a certain cut-off depending upon $k$\n(which is essentially the same as for the unsaturated case),\nonly this new third solution persists throughout the parameter space.\nSo there is either a three-solution regime (for small $|T|$) or a\nsingle-solution regime for higher $|T|$.\n \n\n\n\nFor the case of low saturations ($\\beta=0.05$, third column in\nFigs.\\ \\ref{fargTb0}-\\ref{multisols}), the three-solution regime as predicted\nalways persists for small $|T|$ (orange and green branches in\nFig.\\ \\ref{multisols} almost coincide) and also for small $k$ (the\napparent gap close to $k=0$ in Fig.\\ \\ref{fargTb0} is due to graphics\nlimitations).\nHowever, for slightly larger $k$ ($k>0.6$), the scenario is different as\ncompared to the ultra-low case: the three-solution regime at small $|T|$\nis interrupted by a single-solution regime\n(blue curve only in Fig.\\ \\ref{multisols}) for some interval of $|T|$, and\nthen there is a second (small) three-solution regime which exists upto\na cut-off as in the ultra-low case. For all higher $|T|$, there is a\nsingle solution (the third solution, green curve in Fig.\\ \\ref{multisols}).\nNote however that the single-solution regime sandwiched between the two\nthree-solution regimes \\textit{does not} belong to the\n'third solution branch', but rather it belongs to the 'first solution branch'.\n\nFinally, in the medium saturation range ($\\beta=0.5$, right\n column in\nFigs.\\ \\ref{fargTb0}-\\ref{multisols})), the multi-solutions are\nentirely suppressed leaving behind only a single-solution regime for all $k$\nand $|T|$.\n\n\n \n\n\n\n\n\nAlso, it is to be noted (see Appendix \\ref{AppB})\nthat the stretch of intensities that exhibit the\nmulti-channel regime strongly depends on the energy at site 2, represented by\nthe parameter $V_2$. For a smaller $V_2$ the multi-channel regime persists for\na longer stretch of intensities (i.e., the cut-off is higher) and vice versa.\n\n\n\n\\section{Effects of saturation on multi-channel transmission}\n\\label{sec:transmission}\n\nIn this section, we present in Fig.\\ \\ref{u00001} the transmission scenario\nvia density plots of the\ntransmission coefficient $t(k,|T|^2)$ from Eq.\\ \\eqref{t}, for the parameter values\ncorresponding to the different\nsaturation regimes discussed above. The first, second and third transmission\nchannels correspond to blue, orange and green curves from\nFig.\\ \\ref{multisols},\nrespectively. The results for the two transmission channels in the\nunsaturated case ($\\beta=0$) are visually identical to those of the\nfirst and second channels for the ultra-low saturation ($\\beta=0.01$),\nand thus we do not show these figures below.\n \\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpd11B01.jpg}\n \n \\end{minipage}\n \\hspace{-0.2cm}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpd22B01.jpg}\n \n \\end{minipage}\n \\hspace{-0.2cm}\n \\begin{minipage}[h]{0.34\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpd33B01.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpd1B05Sol1.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpd2B05Sol2.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpd3B05Sol3.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpdB55.jpg}\n \n \\end{minipage}\n \\caption{Color plots of transmission coefficient as a function of\n$k$ and $|T|$ for the three different saturation regimes.\nUpper row: $\\beta=0.01$; middle row: $\\beta=0.05$; lower row:\n$\\beta=0.5$. Left, middle and right panels in two upper rows correspond to\nthe 1st, 2nd and 3rd transmission channel, respectively. In all figures,\n$\\epsilon_{1}=0.5$, $\\varepsilon_V=0.05$, $V^{(0)}=-2.5$, and $\\gamma_{1,2}=1$.\n}\n \\label{u00001}\n \\end{figure}\n\n\n\\subsubsection*{Ultra Low Saturation Regime, $\\beta=0.01$}\n\n\n\n\n\n\nFrom the upper row in Fig.\\ \\ref{u00001}, we see that the major regimes\nof good transmission occur along the first channel, and that transmission\nalong the third channel is essentially negligible. Note however that there\nis a narrow peak with close to perfect transmission also along the second\nchannel, most apparent around $k=0.2$ and $k=2.5$. This second peak appears\nalso for pure on-site nonlinearities \\cite{11,wasay18}; what is important\nto note here is thus that with inter-site nonlinearity (unsaturated or with\nultra-low saturation), the second transmission peak moves over to the second\nbranch of solution, and thus there is only one peak in each of the two first\nchannels.\n\n\n\n\n\\subsubsection*{Low Saturation Regime, $\\beta=0.05$}\n\nHere, we see from the second row of Fig.\\ \\ref{u00001} that the transmission\nalong the first channel is essentially the same as for smaller saturation,\nbut that of the second channel narrows down as the existence region for the\ncorresponding solution shrinks, as discussed above.\nNote that when $\\beta=0.05$ there are two distinct three-solution regimes\nfor $k>0.6$ (see Fig.\\ \\ref{multisols}), but the\ntransmssion along the second and third channels is always negligible in the\nsmall-$|T|$ region. Note also that since the third solution now connects\nto the second solution when $k>0.6$, it also picks up some noticeable, but\nstill small, transmission close to the connection point (seen for\n$1.4\\lesssim |T| \\lesssim 1.8$ in Fig.\\ \\ref{u00001}).\n\n\n\n\n\n\n\n\n\\subsubsection*{Medium Saturation Regime, $\\beta=0.5$}\n\nAs discussed above, in the medium saturation regime\nonly single solutions persist\nthroughout the parameter space.\nThe transmission coefficient shown in the lowest part of Fig.\\ \\ref{u00001}\nis qualitatively similar to analogous plots for the pure on-site nonlinearity\ncase \\cite{11,wasay18}: two separate transmission peaks for small $k$ which\nmerge to a single, broad peak around $k=\\pi\/2$, and then split up again,\neventually yielding four distinct peaks close to $k=\\pi$. Note also that\nalthough a propagating solution exists for arbitrarily large $|T|$ and all $k$,\nthe transmission coefficient is essentially negligible for $|T|\\gtrsim 2.1$.\n\n\n\n\n \\section{Asymmetric multi-channel transmission}\n\\label{sec:asymmetric}\n\n\nHaving identified regimes of multi-solutions, we now consider the\npossibility for multi-channel asymmetric transmission\ndue to the presence of a small nonzero asymmetry between on-site energies.\nTo determine the efficiency of nonreciprocal transmission, i.e.,\ntransmission at diode-like modes, we define the {\\em rectifying factor}\n$\\mathcal{R}$ as\n\\cite{11}\n\\bea{}\n\\mathcal{R}=\\frac{t(k,|T|^2)-t(-k,|T|^2)}{t(k,|T|^2)+t(-k,|T|^2)} ,\n\\label{rf}\n\\end{eqnarray}\nwhere $-1\\leq\\mathcal{R}\\leq+1$. A perfect diode-like transmission occurs at\n$\\mathcal{R}=\\pm1$. In Fig.\\ \\ref{Rultralow3sol} we\npresent the results of the rectifying factor along the different\ntransmission channels for the three different saturability regimes\n(as in previous section, the results for the unsaturated case is visually\nidentical to those of the first two channels for the ultra-low saturation, and\nthus not shown).\n \\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpr11B01.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpr22B01.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpr33B01.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpr11B05.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpr22B05.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{dpr33B05.jpg}\n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \n \\includegraphics[width=\\linewidth]{dprB5.jpg}\n \\end{minipage}\n \\caption{Color plots of rectifying action for $\\beta=0.01$ (upper row),\n$\\beta=0.05$ (middle row) and $\\beta=0.5$ (lower row). In two upper rows,\nthe three panels from left to right correspond to the first, second and third\nsolution, respectively. Site dependent parameter strengths $V^{(0)}=-2.5$,\n$\\varepsilon_V=0.05$, $\\epsilon_{1}=0.5$, $\\gamma_{1,2}=1$. In two upper rows,\nregimes where the channel transmits only right-propagating (left-propagating)\nmodes are coded white (black), while regimes where the channel has no\nsolutions for any propagation direction are coded orange.}\n \\label{Rultralow3sol}\n \\end{figure}\nThe\ntransmission scenario is presented in more detail below via plots of the\ntransmission coefficient $t(k,|T|^2)$ in Eq.\\ \\eqref{t} as a function of\ntransmitted {\\em intensity} $|T|^2$ for the case of ultra-low saturation\n($\\beta=0.01$), low saturation ($\\beta=0.05$) and medium saturation\n($\\beta=0.5$) in Fig.\\ \\ref{vv1}, Fig.\\ \\ref{k151} and Fig.\\ \\ref{vv1111},\nrespectively. Note that the blue curves in Figs.\\ \\ref{vv1} - \\ref{vv1111}\ncorrespond to the right-propagating case ($k>0$), while the red dotted curves\nrepresent the left-propagation ($k<0$), both plotted in their respective\nexistence regimes. Note also that the first, second and third solution branches\nin these figures correspond to blue, orange and green curves from\nFig.\\ \\ref{multisols}, respectively.\n\n\n \\subsubsection*{Ultra-Low Saturation, $\\beta=0.01$}\n\nFor the first transmission channel, we see from upper left\nFig.\\ \\ref{Rultralow3sol} that there are essentially two regimes with\nconsiderable rectification action that also correspond to large transmission\ncoefficients according to Fig.\\ \\ref{u00001}: a regime for small $k$ and\n$T \\approx 0.5$, and another regime for large $k$ around $T \\approx 1$. As seen\nin upper and lower left Fig.\\ \\ref{vv1}, these regimes originate in shifts\nof large-amplitude transmission peaks, and are analogous to large-rectification\nregimes existing for pure on-site nonlinearities \\cite{11,wasay18}.\nOn the other hand, in the regime of intermediate $k$ where transmission peaks\nare broad, transmission is close to symmetric as seen in middle left\nFig.\\ \\ref{vv1}. Moreover, the black band with $\\mathcal{R}=-1$ in upper left\nFig.\\ \\ref{Rultralow3sol} for $1.3 \\lesssim |T|\\lesssim 1.9$ arises since\nthe existence regime for the first transmission channel is always\nsmaller for the right-propagating wave than for the left-propagating for\nthe corresponding set of parameter values\n(see left vertical panel in Fig.\\ \\ref{vv1}).\n \\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K02Sol1.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K02Sol2.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K02Sol3.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K15Sol1.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K15Sol2.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K15Sol3.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K25Sol1.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K25Sol2.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB01K25Sol3.jpg}\n \n \\end{minipage}\n\n \\caption{Transmission coefficient $t(k,|T|^2)$ as a function of $|T|^2$\n for the ultra-low saturated case\n$\\beta=0.01$\n for fixed $k$ values, from top to bottom\n $k=0.2,1.5,2.5$. Left, middle and right vertical panels\n correspond to first, second and third solution branches, respectively.\n \n \n All parameter values as before.}\n \\label{vv1}\n \\end{figure}\n\nFor the second transmission channel, the most interesting effect is the shift\nof the narrow transmission peak with close to perfect transmission, leading to\nthe bright band with $\\mathcal{R}$ close to 1 for\n$1.1 \\lesssim |T|\\lesssim 1.8$ in upper middle Fig.\\ \\ref{Rultralow3sol}.\nThis is seen more\nexplicitly in the middle vertical panel of Fig.\\ \\ref{vv1}.\nNote also the small regime with $\\mathcal{R}$ close to -1 for $k$ close to\n$\\pi$ and $1.8 \\lesssim |T| \\lesssim 1.9$, corresponding to\nthe peak of almost perfect left-propagating transmission appearing\nwhile the right-propagating transmission is declining. As the existence\nregimes for the first and second solutions are identical in the regime of\nultra-low saturability, the black band with $\\mathcal{R}=-1$ for the second\nsolution in upper middle Fig.\\ \\ref{Rultralow3sol} will be the same as that\nfor the first solution.\n\nFinally, as seen in upper right Fig.\\ \\ref{u00001} the transmission along the\nthird channel (corresponding to the green\nsolution branch in Fig.\\ref{multisols}) is negligibly small, and\nessentially symmetric (upper right Fig.\\ \\ref{Rultralow3sol} and\nright vertical panel of Fig.\\ \\ref{vv1}).\nSo the system behaves as a nearly perfect mirror for this channel, in both\ndirections.\n\n\\subsubsection*{Low Saturation, $\\beta=0.05$}\n\n\\begin{figure}[!htbp]\n\\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K02Sol1.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K02Sol2.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K02Sol3.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K15Sol1.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K15Sol2.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K15Sol3.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K25Sol1.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K25Sol2.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB05K25Sol3.jpg}\n \n \\end{minipage}\n\n \\caption{\n \n Same as Fig. \\ref{vv1} but\n for the low saturated case\n $\\beta=0.05$.\nAll other parameters same as before.}\n \\label{k151}\n \\end{figure}\n\nFor the first transmission channel (middle left Fig.\\ \\ref{Rultralow3sol}\nand left vertical panel in Fig.\\ \\ref{k151}), there are only minor\ndifferences compared to the ultra-low saturation regime.\n\nFor the second channel (middle central Fig.\\ \\ref{Rultralow3sol}\nand middle vertical panel in Fig.\\ \\ref{k151}), the major effects appear due to\nthe shrinking of its existence region, for both propagation directions. As\na result, for some $k$-values its existence regimes for left and right\npropagation are fully disjoint, leading to a splitting of the black band\nin the rectification plot for $\\beta=0.01$ into a ``triplet band'' with\nwhite (only right-propagation),\norange (no propagation in any direction), and black (only left-propagation)\nregions appearing in order as $|T|$ is increased. Moreover, the upper cut-off\nfor the low-$|T|$ regime when $k \\gtrsim 0.6$ is also slightly larger for\nthe right-propagating wave, leading to the narrow white stripe around\n$|T|\\simeq 0.5$ in middle central Fig.\\ \\ref{Rultralow3sol}. However,\ntransmission is essentially negligible in both directions in the low-$|T|$\nregime of the second channel (see middle vertical panel in Fig.\\ \\ref{k151}).\n\nFor the third channel (middle right Fig.\\ \\ref{Rultralow3sol}\nand right vertical panel in Fig.\\ \\ref{k151}), regimes of non-negligible\ntransmission appear only close to its lower cut-off for larger $k$ (see\nmiddle right Fig.\\ \\ref{u00001}), which is seen to be somewhat larger for\nthe left-propagating wave. The result is the upper white band in the\nrectification plot corresponding to only right-propagation, followed for\nslightly larger $|T|$ by a band with $\\mathcal{R}$ close to -1. The lower\nwhite stripe is the same as for the second solution since their\nsmall-$|T|$ existence regimes are identical.\n\n\\subsubsection*{Medium Saturation, $\\beta=0.5$}\n\n\\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB50K02.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB50K15.jpg}\n \n \\end{minipage}\n \\hspace{-0.7cm}\n \\begin{minipage}[h]{0.35\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{TranscoeffB50K25.jpg}\n \n \\end{minipage}\n\n \\caption{Transmission coefficient $t(k,|T|^2)$ as a function of $|T|^2$\n for the medium saturated case $\\beta=0.5$, for fixed $k$ values\n \n $k=0.2$ (left), $k=1.5$ (middle), $k=2.5$ (right)}.\n \\label{vv1111}\n \\end{figure}\nIn this regime, the multi-solution regime is entirely suppressed and thus\nthere is only a single solution for all $k$ and $|T|$. We\npresent the rectifying action in lower Fig.\\ \\ref{Rultralow3sol} and\ncorresponding plots of transmission coefficient in Fig.\\ \\ref{vv1111}.\nThe plots are qualitatively similar to those for pure on-site\nnonlinearity \\cite{11,wasay18}. Note that the previous black bands in the\nrectification plots for\nthe first and second solutions in regimes of smaller saturability now have\nturned into a dark band with $\\mathcal{R}$ close to -1, as the narrow\ntransmission peaks in the high-$|T|$ regime\nnow appear for the same solution branch (left Fig.\\ \\ref{vv1111}). The\nadditional transmission peaks appearing for large $k$\n(lower Fig.\\ \\ref{u00001} and right Fig.\\ \\ref{vv1111}) also lead to\na more complicated pattern of regimes with $\\mathcal {R}$ alternating\nbetween values close to +1 and -1 for increasing $|T|$, when $k$ is close to\n$\\pi$.\n\n\n\n\n\\section{Stability Analysis}\n\\label{sec:stability}\n\nIn this section, we investigate the dynamical stability of the stationary\nsolutions used in previous sections. The stability analysis will closely\nfollow as done for instance in \\cite{lepri,jd} for pure on-site\nnonlinearities, and it is performed by first perturbing the solutions as\n\\bea{}\nA_n(t)=P_n(t)+\\delta R_n(t) .\n\\label{perturbation}\n\\end{eqnarray}\nThis will linearize the equation of motion \\eqref{dynamical}. The resulting\nlinearized set of dynamical equations of order $\\delta$ is\n\\bea{}\ni\\dot{R_n}-V_nR_n+R_{n+1}+R_{n-1}\n=\n\\gamma_n\\left(2R_n\\!\\mid\\!P_n\\!\\mid^2\\!+~P_n^2R_n^\\ast \\right)+~~~~~~~~~~~~~\\nonumber\n\\\\\n\\epsilon_{n}\\left[\\frac{W_{n+1} P_n}{(1+\\beta|P_{n+1}|^2|P_{n}|^2)^2}-\\frac{|P_{n+1}|^4 P_n\\beta Z}{(1+\\beta|P_{n+1}|^2|P_{n}|^2)^2}+\\frac{R_n|P_{n+1}|^2}{1+\\beta|P_{n+1}|^2|P_{n}|^2}\\right]+~~~~~~\\nonumber\n\\\\\n\\epsilon_{n-1}\\left[\\frac{W_{n-1} P_n}{(1+\\beta|P_{n-1}|^2|P_{n}|^2)^2}-\\frac{|P_{n-1}|^4 P_n\\beta Z}{(1+\\beta|P_{n-1}|^2|P_{n}|^2)^2}+\\frac{R_n|P_{n-1}|^2}{1+\\beta|P_{n-1}|^2|P_{n}|^2} \\right] ,\n\\label{linearized}\n\\end{eqnarray}\nwhere $W_{n+1}=P^\\ast_{n+1}R_{n+1}+R^\\ast_{n+1}P_{n+1}$, $W_{n-1}=P^\\ast_{n-1}R_{n-1}+R^\\ast_{n-1}P_{n-1}$ and $Z=P^\\ast_nR_n+R^\\ast_nP_n$.\n\nWith the ansatz $P_n(t)=A_ne^{-i\\omega t},~A_n\\neq A_n(t)$ being the\ncomplex amplitudes of a stationary solution as before,\nand $R_n(t)=e^{-i\\omega t}(a_n e^{i\\nu t}+b_n e^{-i\\nu^\\ast t})$,\nthe linearized set of equations \\eqref{linearized} yields an eigenvalue\nproblem of the following form\n\\begin{gather}\n \\nu\\begin{bmatrix} a_n \\\\ b^\\ast_n \\end{bmatrix}\n =\n \\begin{bmatrix}\n M_1 &\n M_2 \\\\\n M_3 &\n M_4\n \\end{bmatrix}.\\begin{bmatrix} a_n \\\\ b^\\ast_n \\end{bmatrix} .\n \\label{evals}\n\\end{gather}\nSpecifying to the two nonlinear sites (dimer), the resulting matrices are\n\\begin{gather}\n\\hspace{-1cm} M_1\n =\n \\begin{bmatrix}\n \\omega-V_1-2\\gamma_1|A_1|^2+\\frac{\\epsilon_1|A_2|^4|A_1|^2\\beta}{(1+\\beta|A_1|^2|A_2|^2)^2}-\\frac{\\epsilon_1|A_2|^2}{1+\\beta|A_2|^2|A_1|^2} &\n 1-\\frac{\\epsilon_1A_2^\\ast A_1}{(1+\\beta|A_2|^2|A_1|^2)^2} \\\\\n 1-\\frac{\\epsilon_1A_1^\\ast A_2}{(1+\\beta|A_1|^2|A_2|^2)^2} &\n \\omega-V_2-2\\gamma_2|A_2|^2+\\frac{\\epsilon_1|A_1|^4|A_2|^2\\beta}{(1+\\beta|A_1|^2|A_2|^2)^2}-\\frac{\\epsilon_1|A_1|^2}{1+\\beta|A_1|^2|A_2|^2}\n \\end{bmatrix}\\nonumber\n\\end{gather}\n\\begin{gather}\n M_2\n =\n \\begin{bmatrix}\n -\\gamma_1 A_1^2+\\frac{\\epsilon_1|A_2|^4 A_1^2\\beta}{(1+\\beta|A_1|^2|A_2|^2)^2} &\n \\frac{-\\epsilon_1A_2 A_1}{(1+\\beta|A_2|^2|A_1|^2)^2} \\\\\n \\frac{-\\epsilon_1A_1 A_2}{(1+\\beta|A_1|^2|A_2|^2)^2} &\n -\\gamma_2 A_2^2+\\frac{\\epsilon_1|A_1|^4 A_2^2\\beta}{(1+\\beta|A_1|^2|A_2|^2)^2}\n \\end{bmatrix}\\nonumber\n\\end{gather}\n\\begin{gather}\n M_3\n =\n \\begin{bmatrix}\n \\gamma_1 A_1^{\\ast 2}-\\frac{\\epsilon_1|A_2|^4 A_1^{\\ast 2}\\beta}{(1+\\beta|A_1|^2|A_2|^2)^2} &\n \\frac{\\epsilon_1A^\\ast_2 A^\\ast_1}{(1+\\beta|A_2|^2|A_1|^2)^2} \\\\\n \\frac{\\epsilon_1A^\\ast_1 A^\\ast_2}{(1+\\beta|A_1|^2|A_2|^2)^2} &\n \\gamma_2 A_2^{\\ast 2}-\\frac{\\epsilon_1|A_1|^4 A_2^{\\ast 2}\\beta}{(1+\\beta|A_1|^2|A_2|^2)^2}\n \\end{bmatrix}\\nonumber\n\\end{gather}\nand\n\\begin{gather}\n\\hspace{-1cm} M_4\n \\!=\\!\n \\begin{bmatrix}\n -\\omega\\!+\\!V^\\ast_1\\!+2\\gamma_1|A_1|^2-\\frac{\\epsilon_1|A_2|^4|A_1|^2\\beta}{(1+\\beta|A_1|^2|A_2|^2)^2}+\\frac{\\epsilon_1|A_2|^2}{1+\\beta|A_2|^2|A_1|^2} &\n -1+\\frac{\\epsilon_1A_2 A^\\ast_1}{(1+\\beta|A_2|^2|A_1|^2)^2} \\\\\n -1+\\frac{\\epsilon_1A_1 A^\\ast_2}{(1+\\beta|A_1|^2|A_2|^2)^2} &\n -\\omega\\!+\\!V^\\ast_2\\!+2\\gamma_2|A_2|^2-\\frac{\\epsilon_1|A_1|^4|A_2|^2\\beta}{(1+\\beta|A_1|^2|A_2|^2)^2}+\\frac{\\epsilon_1|A_1|^2}{1+\\beta|A_1|^2|A_2|^2}\n \\end{bmatrix} .\n\\nonumber\n\\end{gather}\n\n For lattices of size $m$ (with $m=2n+1$ where $n$ is the site counter for\neach linear side) with this type of nonlinear dimer embedded inside the linear\nchains to its right and left, the matrices ($M_{1,..,4}$) will be higher\ndimensional, i.e., $m\\times m$. However, apart from\n the dimer sites the site-dependent coefficients are zero, therefore, in the\nlinear region all entries in $M_2$ and $M_3$ will be zero, and\n \\bea{}\n M_1&=&diag(\\omega)+G \\nonumber\n \\\\\n M_4&=&diag(-\\omega)-G\\nonumber ,\n \\end{eqnarray}\n where $G$ is an $m\\times m$ sparse matrix with ones on both super- and\nsub-diagonals. The eigenvalue problem corresponding to Eq.\\ \\eqref{evals} is\nthen essentially the eigenvalue computation of the resulting $2m\\times 2m$\nsparse matrix. This is done by direct numerical computation of the eigenvalues\nfor a finite-sized chain with the nonlinear dimer embedded in the center.\n\n We will present below sample results of this stability analysis for all\nmulti-solution saturation regimes. The eigenvalue\/eigenvector computations\nwill be shown for a lattice of 201 sites, and the corresponding time\npropagation computations have been performed for lattices of up to 2001 sites,\nin\norder to accommodate for large $t$-values and avoid boundary errors. As pointed\nout in \\cite{lepri}, extended eigenvectors corresponding to a continuous\nspectrum in the infinite-chain limit may cause spurious instabilities due to\nboundary effects, of the order $1\/m$ ($\\sim 5\\times 10^{-3}$ below). Solutions\nexhibiting only such unstable eigenmodes thus correspond to linearly\nstable scattering solutions for the original set-up.\n\n \\subsubsection*{Ultra Low Saturation, $\\beta=0.01$}\n\nWe have chosen $|T|=1$ and $k=0.2,1.5,2.5$ to represent solutions\ncorresponding to small, medium and large wavenumbers respectively, in order to\nconnect with our earlier discussion.\nThe stationary solutions\nare depicted in Fig.\\ \\ref{ssb01}, for the three solution branches.\n\\begin{figure}[!htbp]\n\\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB01K02.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB01K15.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB01K25.jpg}\n \n \\end{minipage}\n\n \\caption{Stationary solutions at $\\beta=0.01$, $|T|=1$, real (red circles)\nand imaginary (green squares) part of the solutions: left vertical panel for\n$k=0.2$, middle vertical panel for $k=1.5$ and right vertical panel for\n$k=2.5$. In each vertical panel,\ntop plot corresponds to the first solution branch, middle to the second\nbranch and lower to the third branch.}\n \\label{ssb01}\n \\end{figure}\nNote that in this regime, the transmission coefficient is considerable only\nfor the first solution, very small for the second and essentially negligible\nfor the third, for all values of $k$.\n \n\nResults from the stability analysis\nare presented in Fig.\\ \\ref{b01evals}.\n\\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K02T1Sol1a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K02T1Sol2a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K02T1Sol3a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K15T1Sol1a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K15T1Sol2a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K15T1Sol3a.jpg}\n \n \\end{minipage}\n\\\\\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K25T1Sol1a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K25T1Sol2a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B01K25T1Sol3a.jpg}\n \n \\end{minipage}\n \\caption{Stability analysis for $|T|=1$ at $\\beta=0.01$:\n$k=0.2$ (first and second row), $k=1.5$ (third and fourth row),\n$k=2.5$ (fifth and sixth row).\nLeft vertical panel shows the eigenvalues and most unstable\neigenvectors for first solution,\nmiddle panel for the second solution and right panel for the third solution.}\n \\label{b01evals}\n \\end{figure}\nFor the first solution (left vertical panel), we find that it is always\nunstable for these parameter values, with an unstable eigenvector localized\nat the dimer. For small and intermediate $k$, the unstable\neigenvalues are complex\ncorresponding to a rather weak oscillatory instability, while a stronger\npurely exponential instability appears for larger $k$. The second solution\n(middle vertical panel)\nis essentially stable for small and intermediate $k$ (the observed tiny\nimaginary parts of eigenvalues correspond to extended eigenvectors and are\nspurious due to boundary effects as discussed above), while a very weak,\noscillatory instability appears for larger $k$ due to a resonance between\na mode localized at the dimer and the continuous spectrum. The third solution\n(right vertical panel) is strongly unstable with a purely imaginary\neigenvalue, and an eigenmode strongly localized at site 2.\n\n\nThe dynamics resulting from the instabilities of the first solution is\nillustrated in Fig.\\ref{tpropb01sol1}.\n\\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB01K02T1Sol1t400.jpg}\n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB01K15T1Sol1t400.jpg}\n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB01K25T1Sol1t400.jpg}\n \\end{minipage}\n \\caption{Time propagation corresponding to the first solution\nin Figs.\\ \\ref{ssb01}-\\ref{b01evals};\n$k=0.2$, $k=1.5$, $k=2.5$ from left to right.\nSnapshot at time 400 with a small $\\mathcal{O}(10^{-3})$ arbitrary perturbation\ninserted at site 1.\nUpper figures: Real (blue) and imaginary (red) parts. Lower: $|A_n|^2$.\n}\n \\label{tpropb01sol1}\n \\end{figure}\n \nFor $k=0.2$ we observe that, after an initially oscillatory dynamics with\nexponentially increasing amplitudes at the center, the solution settles down\ninto an almost stationary transmission regime corresponding to a\n{\\em larger} $|T|$ ($|A_2|\\approx 1.52$ at time 400 in left\nFig.\\ \\ref{tpropb01sol1}). However, this value of\n$|T|$ is above the existence threshold for the first solution at $k=0.2$, and\nthe solution is not strictly stationary but shows small-amplitude oscillations\nfor $|A|$ at the dimer sites, as well as a weak long-wavelength spatial\nmodulation. At $k=1.5$ (middle Fig.\\ \\ref{tpropb01sol1}) the oscillatory\ninstability is stronger and yields persistent spatiotemporal oscillations,\nwhile at $k=2.5$ (right Fig.\\ \\ref{tpropb01sol1}) the solution instead, after\nthe initial strong non-oscillatory exponential instability, settles down into\nan essentially stationary state with considerably {\\em smaller} $|T|$\n($|A_2|\\approx 0.27$ at time 400).\n\nThe second solution is essentially stable for $|T|=1$, and no significant\nchanges are observed in the time evolution for any of the considered values\nof $k$.\n\\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB01K02T1Sol3t40Sites401.jpg}\n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB01K15T1Sol3t40Sites401.jpg}\n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB01K25T1Sol3t40Sites401.jpg}\n \\end{minipage}\n \\caption{\n \n Similar as Fig.\\ \\ref{tpropb01sol1} but for\n the third solution\nin Figs.\\ \\ref{ssb01}-\\ref{b01evals},\nwith snapshots at time 40.\nOnly sites 2-30 of a 401-site system are shown.\n}\n \\label{tpropb01sol3}\n \\end{figure}\nFor the third solution, instability-induced dynamics is\nillustrated in Fig.\\ \\ref{tpropb01sol3}, where the amplitudes\nof the initial portion of the transmitting side only (amplitudes at the\nincoming side are of the order of $10^5$ as in Fig.\\ \\ref{ssb01}) are\nshown at time 40\n(the instability develops rapidly due to the large eigenvalue).\nTypically,\nthe instability results in an initial decrease of $|A_2|$ (where the unstable\neigenmode is localized) to values close to zero, followed by recurring\noscillations between small and larger amplitudes at this site. As a result of\nthese oscillations the transmitted intensity will start to deviate from 1 as\nseen previously for the first solution branch; note however from\nFig.\\ \\ref{tpropb01sol3} that now $|A_n|<1$ for $k=0.2$ and $|A_n|>1$ for\n$k=1.5$ and $k=2.5$ at the initial portion of the transmitting side\n(the transmission coefficient evidently remains very small\ndue to the huge amplitudes on the left side).\n\n\n \n\n\n\n\n \n\n\n \\subsubsection*{Low saturation, $\\beta=0.05$}\n\nWe will here pick $|T|=0.4$ as representative for the small-$T$ regime giving\nthree different solutions for each of the sample $k$ values\n($k=0.2, 1.5, 2.5$),\nand show the stationary solution plots in Fig.\\ \\ref{ssb05}.\n \\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB05K02T04.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB05K15T04.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB05K25T04.jpg}\n \n \\end{minipage}\n \\caption{\n \nSame as Fig.\\ \\ref{ssb01} but with $\\beta=0.05$ and $|T|=0.4$.\n }\n \\label{ssb05}\n \\end{figure}\nNote that in this regime, the transmission coefficient is non-negligible only\nfor the first solution.\n\n\nThe stability of each solution in this regime at the respective $k$ values is\nillustrated in Fig.\\ \\ref{b05evals}.\n\\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K02T04Sol1a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K02T04Sol2a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K02T04Sol3a.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K15T04Sol1a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K15T04Sol2a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K15T04Sol3a.jpg}\n \n \\end{minipage}\n\\\\\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K25T04Sol1a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K25T04Sol2a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05K25T04Sol3a.jpg}\n \n \\end{minipage}\n \\\\\n\n \\caption{\n \n Same as Fig.\\ \\ref{b01evals} but with $\\beta=0.05$ and\n $|T|=0.4$.\n}\n \\label{b05evals}\n \\end{figure}\nComparing to Fig.\\ \\ref{b01evals}, we note that the instabilities for the first\nsolution here are generally weaker, and to our numerical accuracy it is\nlinearly stable at $k=1.5$ (i.e., for wave numbers close to $\\pi\/2$). The\nsecond solution is still stable for small and intermediate wave numbers, but\nnow destabilizes with a purely imaginary eigenvalue for larger $k$, where it\nis close to its bifurcation point with the third solution\n(see Fig.\\ \\ref{multisols}). The third solution remains strongly unstable.\n\nTo illustrate the outcome of these instabilities, we show in Fig.\\\n\\ref{tpropb05} snapshots\nof solutions only for unstable cases that differ significantly to those\npreviously shown for $\\beta=0.01$ and $|T|=1$. For the first solution at\n$k=0.2$ (left Fig.\\ \\ref{tpropb05})\nthe instability is now non-oscillatory, and results in a slight\ndecrease of the amplitude on the transmitting side\n($|A_2|\\approx 0.39$ at time 400). At $k=1.5$ the solution is stable, and\nat $k=2.5$ the unstable dynamics is analogous to that of\nFig.\\ \\ref{tpropb01sol1}. The unstable dynamics of the second solution\nat $k=2.5$ is illustrated in right Fig.\\ \\ref{tpropb05} and is similar to\nthat previously described for the third solution, resulting after some\ntransient in amplitudes $|A_n|>0.4$ at the initial portion of the transmitting\nside (the transmission coefficient remaining small with maximal amplitudes\n $|A_n|\\sim 2000$ on the left side).\nFor the third solution, dynamics is analogous\nto that observed in Fig.\\ \\ref{tpropb01sol3}.\n\\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB05K02T04Sol1t400.jpg}\n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB05K25T04Sol2t400Sites2001.jpg}\n \n \\end{minipage}\n \\caption{Time propagation of unstable stationary solutions\nfrom Figs.\\ \\ref{ssb05}-\\ref{b05evals};\nLeft: First solution, $k=0.2$.\nRight: Second solution, $k=2.5$ (only sites 2-30 are shown).\nSnapshots at time 400\nwith a small $\\mathcal{O}(10^{-3})$ arbitrary perturbation\ninserted at site 1. Upper figures: Real (blue) and imaginary (red) parts.\nLower: $|A_n|^2$.\n}\n \\label{tpropb05}\n \\end{figure}\n\n\n \\subsubsection*{Medium Saturation, $\\beta=0.5$}\n\nAt this saturation strength, only a single-solution regime persists for all\n$k$ and $|T|$ values. We will pick two representative $|T|$ cases to present\nthe results below, $|T|=1$ and $|T|=2$, to see how the scenario differs\nfor relatively small versus larger intensities.\nStationary solution plots are shown in Fig.\\ref{ssb5T1}.\n \\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB5K02T1.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB5K15T1.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB5K25T1.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB5K02T2.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB5K15T2.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.32\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{SSB5K25T2.jpg}\n \n \\end{minipage}\n \\caption{Stationary solutions at $\\beta=0.5$, real (red circles) and\nimaginary (green squares) part of the solutions: Left, middle and right\nvertical panels for $k=0.2$, $k=1.5$ and $k=2.5$, respectively. Upper\nhorizontal panel corresponds to $|T|=1$, lower to $|T|=2.$.}\n \\label{ssb5T1}\n \\end{figure}\nNote that for $|T|=2$, only the case $k=2.5$ corresponds to a considerable\ntransmission coefficient (cf.\\ Figs.\\ \\ref{u00001}, \\ref{vv1111})\n\nThe stability analysis with corresponding examples of unstable time\npropagation for the case of $|T|=1$ and the three sample $k$ values is\npresented in Fig.\\ref{b5evalsK02SSR}.\n \\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B5K02T1a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B5K15T1a.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B5K25T1a.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB5K02T1t200Sites2001.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB5K15T1t100Sites2001.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB5K25T1t100Sites2001.jpg}\n \n \\end{minipage}\n \\caption{Top two horizontal panels: Stability analysis for $|T|=1$ and\n$\\beta=0.5$, with eigenvalues at top and most unstable eigenvectors at\nsecond row. Left, middle and right plots correspond to $k=0.2$, $k=1.5$ and\n$k=2.5$, respectively. Lower two horizontal panels: snap shots of time\npropagation for the corresponing values of $k$ (at time 200 for $k=0.2$ and\n100 for $k=1.5, 2.5$). Third row: real (blue) and imaginary (red) parts;\nfourth row: $|A_n|^2$.}\n \\label{b5evalsK02SSR}\n \\end{figure}\nComparing with Figs.\\ \\ref{b01evals}-\\ref{tpropb01sol1}, we note that the\nscenario is very similar to that of the first solution for the same value of\n$|T|$ when $\\beta=0.01$; the main qualitative difference is seen for\n$k=2.5$ where the instability now is oscillatory and slightly weaker. Thus,\nwe may conclude that as long as the amplitudes at the dimer sites are\nmoderate, which will typically be the case when $|T|$ is relatively small and\ntransmission coefficient $t$ is relatively large, the scenario in the regime\nof medium saturation is qualitatively similar to that for the first\nsolution branch for weaker saturability.\n\n The case of various sample $k$ at higher intensities ($|T|=2$)\nis shown in Fig.\\ \\ref{b5evalsK15SSR}.\n\\begin{figure}[!htbp]\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B5K02T2.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B5K15T2.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B5K25T2.jpg}\n \n \\end{minipage}\n \\\\\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB5K02T2t300Sites2001.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB5K15T2t300Sites2001.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.3\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{tpropB5K25T2t300Sites2001.jpg}\n \n \\end{minipage}\n \\caption{Similar as Fig.\\ \\ref{b5evalsK02SSR} but for $|T|=2$. The\nsnapshots for time propagation plots are all at time 300.\n}\n \\label{b5evalsK15SSR}\n \\end{figure}\nFor $k=0.2$ (left Fig.\\ \\ref{b5evalsK15SSR}) and $k=1.5$ (middle\nFig.\\ \\ref{b5evalsK15SSR}) the solution is now stable (but with very small\ntransmission coefficient), while for $k=2.5$ (right Fig.\\ \\ref{b5evalsK15SSR})\nthe instability scenario is\nsimilar as above for $|T|=1$, resulting after some time in an almost\nstationary transmission with considerably smaller amplitudes at the\ntransmitted side of the dimer ($|A_2|\\approx 0.57$ at time 300).\n\nSummarizing this section, we note some similarities and differences\ncompared to previously reported stability\nresults for pure on-site nonlinearities\n\\cite{lepri,jd}. As in \\cite{lepri,jd}, we observe that the\nexactly stationary propagating solutions are unstable in regimes where the\ntransmission coefficient is significant. Stationary waves having small\ntransmission\ncoefficient appear typically as stable as noted in \\cite{lepri,jd}, except\nin the multisolution regimes where the third\nsolution branch (which has no counterpart neither for systems with pure on-site\nnonlinearity, nor with unsaturated inter-site nonlinearities) is generally\nunstable, and the second solution branch destabilizes close to its\nbifurcation with the third solution. As long as the instability is weak,\nit is typically\noscillatory (complex eigenvalues) as originally reported in \\cite{lepri}.\nIn regimes of stronger instabilities eigenvalues become purely imaginary, as\nalso seen for the saturable on-site nonlinarity in \\cite{jd}. However, a\nmajor difference is that in all cases reported in \\cite{lepri,jd} for\non-site nonlinearities, the\ninstability resulted in a trapped, localized defect mode at the central\nnonlinear sites. As seen above, none of the here considered instability regimes\nresulted in any significant trapping at the dimer. Thus, it appears that\ninter-site nonlinearities generally\ncounteract the creation of a localized dimer mode. Another difference is that\nin \\cite{jd}, it was concluded that instabilities generically\n(for on-site saturable oligomers) appeared to transport power to the right\npart of the lattice for $k>0$ (thus decreasing the power of the part\nimmediately to the left of the dimer). Here, we observe this scenario in some\ncases (mainly for first solution branch with small $k$ when instability is\noscillatory, and third branch at larger $k$), while in other cases the\nscenario is opposite with a decrease of power at the right side\n(e.g., for large $k$ in the single-solution regime and for first solution\nin multi-solution regime, and for small $k$ for third solution). Thus, even\nthough the transmission coefficient for stationary transmission\nin the regime of medium saturation\n(Figs.\\ \\ref{u00001}, \\ref{vv1111}) looks qualitatively similar to the\non-site nonlinearity cases, the instability-induced dynamics may be quite\ndifferent.\n \n\n \\section{Propagation of an initial Gaussian}\n\\label{sec:Gaussian}\n\n As an example different from the stationary plane wave solutions we\ninvestigate, by direct numerical integration of\nEq.\\ \\eqref{dynamical}, the time propagation of an initial Gaussian wavepacket\nthrough the chain with the dimer defect having saturated inter-site\nnonlinear interactions between the two dimer sites.\nThe initial Gaussian data is\n\\bea{}\nA_n(0)= I~ \\textmd{exp}\\left[-\\frac{\\left(n-n_0\\right)^2}{w^2}+ik_in\\right] ,\n\\label{gwp}\n\\end{eqnarray}\nwhere $I$ and $p$ are the amplitude and width of the initial wave-packet taken\nto be $\\sqrt{3}$ and $56$, respectively. Typical results for this initial\ncondition with $|k_0|=\\pi\/2$ (corresponding\nto maximum propagation speed and minimum dispersion) in the regimes of low\n($\\beta=0.05$) and medium ($\\beta=0.5$) saturation are shown in\nFig.\\ \\ref{gwpb00001}. (Results in the ultra-low saturation regime are\nvery similar to those for $\\beta=0.05$.)\n\\begin{figure}[!htbp]\n \n \n \\begin{minipage}[h]{0.4\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05tpL.jpg}\n \n \\end{minipage}\n \\hspace{0.5cm}\n \\begin{minipage}[h]{0.4\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B05tpR.jpg}\n \n \\end{minipage}\n \\begin{minipage}[h]{0.4\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B5tpL.jpg}\n \n \\end{minipage}\n \\hspace{0.5cm}\n \\begin{minipage}[h]{0.4\\linewidth}\n \\centering\n \\includegraphics[width=\\linewidth]{B5tpR.jpg}\n \n \\end{minipage}\n \\caption{Color plots of $|A_n(t)|^2$ as a function of $n$ (lattice sites)\nand $t$ (time), with the Gaussian initial data of Eq.\\ \\eqref{gwp}, saturation\n$\\beta=0.05$ (upper horizontal panel) and\n$\\beta=0.5$ (lower horizontal panel); wavenumber $k_0=\\pm\\frac{\\pi}{2}$,\nand all other parameters as before. Left (right) vertical panel corresponds to\nthe cases with left (right) incidence. The dimer is located at sites\n501 and 502 in a 1000 site lattice.\n}\n \\label{gwpb00001}\n \\end{figure}\n\nThe transmission coefficient for the wavepacket is defined\nas in \\cite{11} to be the ratio of transmitted power to the initial input\npower. For the case of right propagating signal, it is given by\n \\bea{}\n \\tau_+=\\frac{\\sum_{i>\\frac{n}{2}+2}|A_i(t_f)|^2}{\\sum_{i<\\frac{n}{2}+1}|A_i(0)|^2} ,\n \\label{tcR}\n \\end{eqnarray}\nwhere $n$ is the total number of sites, the dimer is located at\nsites $n\/2+1$ and $n\/2+2$, and $t_f$ the final time for the\nnumerical integration. Equation \\eqref{tcR} can be understood by a direct\nanalogy with Eq.\\ \\eqref{t}. For $\\beta=0.05$,\nthe transmission coefficient for the left\nincidence (right propagating case; top left plot in Fig.\\ \\ref{gwpb00001})\nis found to be $\\tau_+=0.474$. In an analogous way, the transmission\ncoefficient for the right incidence (left propagating) case depicted in\nthe top right plot in Fig.\\ \\ref{gwpb00001} turns out to be\n$\\tau_-=0.603$. The rectifying factor is computed by the formula\n$f=\\frac{\\tau_+-\\tau_-}{\\tau_++\\tau_-}$, in analogy with Eq.\\ \\eqref{rf},\nwhich in this case is found to be $f=-0.120$. The distinct left and right\ntransmission coefficients reflect the fact that the parity symmetry of the\ndimer defect is indeed broken.\nThe lower horizontal panel in Fig.\\ \\ref{gwpb00001} corresponds to the regime\nof medium $\\beta$ strength ($\\beta=0.5$). The transmission coefficients are\nfound to be $\\tau_+=0.797$ and $\\tau_-=0.819$, and the corresponding\nrectifying factor is found to be $f=-0.013$.\nThus, increasing saturation implies that the transmission increases but the\nasymmetry decreases significantly, as was also found in previous\nworks for on-site saturability \\cite{Erik,wasay3}. This is also consistent\nwith results for the stationary transmission, e.g., by comparing middle left\nplot in Fig.\\ \\ref{k151} and middle plot in Fig.\\ \\ref{vv1111}.\nFor $\\beta=0.05$ and $|k|$ close to $\\pi\/2$ (Fig.\\ \\ref{k151})\nthere is essentially no transmission\nwith $|T|^2 > 2$, and thus the peak intensity of the Gaussian with $I^2 = 3$\ncannot be transmitted, while for $\\beta=0.5$ (Fig.\\ \\ref{vv1111}) there\nis almost complete transmission around $|T|^2 = 2.5$, allowing for a larger\nportion of the Gaussian to be transmitted. On the other hand, the main\ntransmission around $|T|^2 = 2.5$ for $\\beta=0.5$ is almost symmetric for\nleft- and right-propagation, while for $\\beta=0.05$ the stationary\ntransmission for right-propagation (blue curve) dips sharply around\n$|T|^2 = 1.8$, while for left-propagation (red curve) the dip appears later,\naround $|T|^2 = 2$. Thus, a considerable part of the Gaussian with $I^2 = 3$\nmay be transmitted to the left but not to the right. (Weak instabilites of\nthe stationary transmission modes described in previous section will\nnot significantly affect the transmission of a rapidly moving and\nnot too wide Gaussian, if the time for the Gaussian to pass the dimer will\nbe shorter than the time for the instability to develop.)\n\nIt should also be noted from Fig.\\ \\ref{gwpb00001} that, in addition to\npartial transmission\/reflection of the Gaussian and creation of\nsmall-amplitude radiation waves, a rather small part will remain trapped\nat the dimer sites. For the cases shown in Fig.\\ \\ref{gwpb00001}, we find\nat time $t_f=250$ the trapped intensity $P_{trap}\\equiv |A_{501}|^2+|A_{502}|^2$ to\nbe: $P_{trap}(\\beta=0.05, k=+\\pi\/2)=0.77$,\n$P_{trap}(\\beta=0.05, k=-\\pi\/2)=2.17$,\n$P_{trap}(\\beta=0.5, k=+\\pi\/2)=2.79$\n$P_{trap}(\\beta=0.5, k=-\\pi\/2)=2.29$.\nThus, in these cases considerably less trapping appears in the case when the\nmain part is reflected, compared to when it is mainly transmitted. This is\nopposite to the example considered in \\cite{11}, where trapping was enhanced\nwhen the main part was reflected. We may also note that for on-site\nsaturabilites, increasing saturation strength typically decreases trapping\n\\cite{Erik}, while we here observed an opposite tendency (which might be\nintuitively understood as increasing the saturability of the inter-site\nnonlinearity implies that the on-site nonlinearity will be relatively more\nimportant, and trapping is in general mainly associated with on-site\nnonlinearities).\n\n\n\nNote also that the transmission coefficient typically is largest\nwhen the incoming Gaussian first encounters the dimer site with smallest\n$|V_2|$, i.e., the site where the deviation from the linear chain with\nzero on-site potential is smallest. Intuitively this seems reasonable, and an\nanalogous remark was made for a saturable on-site potential in \\cite{jd}.\nWe checked a few other parameter values and obtained analogous results.\nKeeping $V_1=-2.625$ and changing the on-site amplitude on the right\ndimer site to $V_2=-1.875$ (i.e., decreasing its magnitude), we obtained\nfor $\\beta=0.05$ that $\\tau_+=0.594$ and $\\tau_-=0.746$ with\nrectifying factor $f=-0.113$, i.e., transmission increases while rectification\nremains almost the same (and with the same sign). On the other hand, changing\nthe on-site amplitude at the right dimer site to $V_2=-3.125$\n(i.e., increasing its magnitude to have $|V_2|>|V_1|$) resulted in\n $\\tau_+=0.722$ and $\\tau_-=0.542$ with $f=+0.143$. This means that the\ndiode-like transmission in the low-saturation regime, as expected, gets\nreversed when $|V_2|>|V_1|$.\n\n\\section{Conclusions}\n\\label{sec:conclusions}\n\nThe main aim of this work has been to provide a clear and comprehensive\ndescription of qualitatively novel effects that appear in the\ntransmission scenario of a DNLS-type dimer when nonlinear coupling between\nthe dimer sites is taken into account, in addition to a standard onsite\n(cubic) nonlinearity. For the generality of the description, we considered\na saturable intersite nonlinearity, with a parameter $\\beta$ interpolating\nbetween a purely cubic intersite + onsite nonlinearity at $\\beta=0$, and\na cubic pure onsite nonlinearity at large $\\beta$. A major novel result is\nthat, in contrast to the commonly studied cases with pure onsite nonlinearity,\nthe transmission coefficient for stationary transmission is in general no\nlonger a single-valued function\nof the transmitted intensity $|T|$, as the standard backward transfer map in\nregimes of small and moderate\n$|T|$ and low saturation will have three distinct solutions\n(two in the case of strictly zero saturation). These solutions\ndiffer in their relative phase shift across the dimer.\nAs the saturation\nincreases, solutions disappear through bifurcations at critical saturation\nstrengths (depending on the wave number), leaving a single solution\nbranch in regimes of medium and strong saturation.\n\nWe analyzed numerically the transmission coefficient of the three different\nbranches, and showed how these merged into the single-valued (as a function\nof $|T|$) transmission picture, known from previous works, as saturation\nstrength increased. We also performed a linear stability analysis\nof the stationary\nscattering solutions. In low-saturation regimes with three solution branches,\none branch, with very small transmission, exhibited strong instabilities,\nwhile from the other two branches solutions with small transmission\ncoefficients were typically stable, and those with larger transmission\nexhibited rather weak instabilites, growing larger when approaching\ntransmission peaks. Qualitatively the results for the latter two\nbranches agree with previous work for pure onsite DNLS. Studying by direct\nnumerical simulations the effect of the instabilities on the transmission, two\nnotable differences to previous works were found as a result of the\nintersite nonlinearities: (i) we did not observe any\nsignificant trapping at the dimer sites; (ii) while previous works always\nfound transport of power towards the transmission side, in some regimes we\ninstead found transport of power towards incoming\/reflected side.\n\nWe also analyzed the left\/right asymmetries in the transmission coefficient\nwith different linear onsite potentials at the dimer sites, both for\nstationary plane waves and for\nrather wide and rapidly moving Gaussian excitations with amplitiude near the\nmain transmission threshold. In addition to shifting the location of\ntransmission peaks, the multiple transmission branches for low saturability\nleads to a novel rectification effect for stationary transmission, where a\ntransmission peak in one direction, for a given branch and a given $|T|$,\nmay correspond to non-existence of solutions in the opposite propagation\ndirection for this branch. For the Gaussian propagation, we found that\nincreasing saturation strength typically would increase the transmission\ncoefficient but decrease the rectifying factor, as the stationary transmission\nspectrum also became broader and more symmetric for wave vectors close to\n$\\pi\/2$.\n\nFinally, we also comment on possible applications of our work.\nOur choice of model arose from the interest in studying the gradual transition\nfrom a system with non-saturated\nto saturated intersite nonlinearities, keeping onsite nonlinearities\nnon-saturated. The saturability is typically in the form\nappearing from photovoltaic-photorefractive materials, which may be a suitable\nclass of systems where the phenomenology of multichannel asymmetric\ntransmission described here may be observed. A relevant topic for future\nresearch would be to perform a similar analysis for the type of saturable\nnonlinear couplings proposed in \\cite{Hadad17}, with direct application to\nelectric circuit ladders \\cite{Hadad18}.\n\n\\section*{Acknowledgments}\n\nM.A.W would like to thank Jennie D'Ambroise for several fruitful\ndiscussions and to Byoung S. Ham for the facilities. M.A.W acknowledges financial support by the ICT R\\&D program of MSIT\/IITP (1711073835: Reliable crypto-system standards and core technology development for secure quantum key distribution network) and GRI grant funded by GIST in 2018. M.J. thanks Erik Johansson for discussions during his thesis work\n\\cite{Erik}, which served as a source of inspiration for the present work.\n\n\n\n \\bibliographystyle{unsrt}\n\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\nA major open problem in differential geometry is to determine whether a closed almost complex manifold of dimension at least six always admits an integrable complex structure. By a celebrated theorem of Newlander and Nirenberg, an almost complex structure is integrable if and only if it satisfies a certain system of first order partial differential equations codified by the vanishing of the Nijenhuis tensor. An understanding of the topology of the space of all almost complex structures may be useful in the search for those which are integrable. We take this as motivation for our study of the topology of the space of almost complex structures on a six--manifold. The present work is a continuation of \\cite{FGM21} which focused on the six--sphere and touched upon the case of almost complex structures on six--manifolds with vanishing first Chern class.\n\nLet $M$ denote an oriented six--manifold and $\\mathcal J(M)$ be the space of \nall almost complex structures on $M$ inducing the given orientation.\nFixing a Riemannian metric on $M$, the inclusion $J(M) \\hookrightarrow \\mathcal J(M)$ of the subspace of almost complex structures which are orthogonal with respect to the metric is a homotopy equivalence, allowing us to analyze $\\mathcal J(M)$ via a space of sections of a fiber bundle with compact fibers. Generally, over an oriented Riemannian $2n$--manifold $M$ one can consider the $SO(2n)\/U(n)$ bundle of pointwise linear orthogonal complex structures $Z_+(M) \\to M$ compatible with the orientation on $M$; the space $Z_+(M)$ is known as the \\emph{(positive) twistor space} of $M$. Sections of this bundle correspond to orthogonal almost complex structures on $M$ compatible with the orientation.\n\nThe twistor space construction can be done in any dimension, but six--manifolds enjoy the special property that the fiber of the twistor space is likewise six--dimensional. Hence two orthogonal almost complex structures give embeddings of the manifold into its twistor space which generically intersect at a finite number of points. One of our main results (\\Cref{intersection}) computes this intersection number in terms of the Chern classes of the two almost complex structures. Employing a theorem of Michelsohn and Salamon, we observe that negative self-intersection restricts the possible deformations of an orthogonal complex structure (\\Cref{deform}).\n\nIn order to study the homotopy type of $J(M)$, in Section 3 we use the existence of spin$^c$ structures on oriented four--manifolds and almost complex six--manifolds to describe the integral cohomology of their twistor spaces. This will include both the positive and the \\emph{negative} twistor space $Z_-(M)$, i.e. the total space of the bundle of linear complex structures inducing the opposite orientation on the tangent space. Presumably these results are well known, but we were not able to find them in the literature in this generality.\n\n\nWe take particular care with orientations throughout, due to varying historical conventions (e.g. the original \\cite{AHS78}, and \\cite{Hi81}, refer to the negative twistor space as the ``twistor space'', while this terminology is reserved for the positive twistor space for instance in \\cite{LM}\\footnote{Despite this, the statement of \\cite[Theorem 4.1]{AHS78} in \\cite[Theorem IV.9.14]{LM} uses the convention of \\cite{AHS78}.} and \\cite{Sa84}), and to the authors' difficulty in verifying some formulas in \\cite[p.135]{Hi81}; see \\Cref{hitchin}.\n\nThe twistor spaces $Z_+(M)$ and $Z_-(M)$ (whose homotopy types generally differ when the dimension of $M$ is divisible by four) carry two natural almost complex structures, differing by the choice of induced orientation on the fiber (see e.g. \\cite[Proposition 3.1]{Sa84}), known as the \\emph{Atiyah--Hitchin--Singer} and \\emph{Eells--Salamon} almost complex structures. Even though the standard complex structure and its negative on the fibers $SO(4)\/U(2) \\cong \\mathbb{CP}^1$ and $SO(6)\/U(3) \\cong \\mathbb{CP}^3$ are biholomorphic via complex conjugation, the Eells--Salamon almost complex structure is never integrable \\cite[Proposition 3.4]{Sa95}, in contrast to the Atiyah--Hitchin--Singer structure (this phenomenon is not unique to dimensions four and six).\n\nOur second main result is a description of the rational homotopy type of (a given component of) the space of almost complex structures on six--manifolds, under the additional assumption that $b_1(M) = 0$ and $\\int_M c_1c_2 - c_3 \\neq 0$ (\\Cref{Qhomotopy6}). For this we use an expression of $J(M)$ as the quotient of the space of sections of an $S^7$--bundle by an $S^1$--action (\\Cref{fibration}), which one can compare with the result obtained for $c_1=0$ in \\cite[Proposition 5.1]{FGM21}.\n\nThroughout we provide examples for all of the mentioned results.\n\n\n\n\\subsection*{Notation and conventions}\n\n The projectivization of a complex vector bundle $E$ is denoted by $\\mathbb{P}(E)$. We denote the Chern classes of a complex vector bundle by $c_i$, and the Pontryagin classes of a real vector bundle by $p_i$; if the vector bundle is complex, by its Pontryagin classes we mean those of the underlying real bundle. The Euler class is denoted by $\\mathrm{e}$. The Euler characteristic of a space is denoted by $\\chi$, and $\\sigma$ is the signature of an oriented closed manifold. All manifolds are assumed connected unless otherwise stated. \n\nWe denote by $\\Gamma(E)$ the space of sections of a bundle $E \\to M$ (where $E$ is not necessarily a vector bundle). If $s \\colon M \\to E$ is a section, $\\Gamma(E)_s$ denotes the connected component of $s$ in $\\Gamma(E)$.\nFor $E \\to M$ a vector bundle with a metric, we write $S(E) \\to M$ for the associated sphere bundle. We denote by $J(M)$ the connected component of a specific point in $\\Gamma(Z_+(M))$, which will be clear from context. For a vector space $V$ with an inner product, $J(V)$ will denote the space of all orthogonal (linear) complex structures on $V$. If $V$ is oriented, $J_+(V)$ (respectively $J_-(V)$) denotes the connected component of $J(V)$ consisting of elements which induce the given orientation on $V$ (respectively the opposite orientation). By $\\Map(X,Y)$ we denote the space of unbased maps $X \\to Y$ with the compact-open topology.\n\nCohomology is singular cohomology with integral coefficients unless another choice of coefficients is indicated. The evaluation of a cohomology class $\\alpha$ on a homology class $A$ is denoted by $\\langle \\alpha, A \\rangle$ or by $\\int_A \\alpha$. In the context of rational homotopy theoretic models, $\\Lambda(x_i)$ denotes the free graded--commutative algebra on generators $x_i$. \n\nWe will make frequent use of the projective bundle formula, which states that for a complex vector bundle $E \\to M$ of complex rank $k$, the cohomology of the projectivized bundle $\\mathbb{P}(E) \\xrightarrow{p} M$ is the free $H^*(M)$--module on one generator $x$ subject only to the relation $x^k + c_1(E)x^{k-1} + \\cdots + c_{k-1}(E)x + c_k(E) = 0$, where $x$ is the first Chern class of the line bundle $\\mathcal{O}_{E^*}(1)$ (see \\cite[Definition 15.13]{D12}). This line bundle is dual\nto the tautological (Hopf) line sub-bundle of $p^*(E)$ whose fiber over $\\ell \\in \\mathbb{P}(E_x)$ is $\\ell \\subset E_x$. It restricts to $\\mathcal{O}(1)$ on each fiber $\\mathbb{CP}^{k-1}$. \n\n\n\n\\subsection*{Acknowledgements} We thank Luis Fernandez and Scott Wilson for numerous helpful discussions. The first author was partially supported by FCT\/Portugal through CAMGSD, IST-ID, projects UIDB\/04459\/2020 and UIDP\/04459\/2020. The second author would like to thank the Max Planck Institute for Mathematics in Bonn for its support, along with the Mittag-Leffler Institute in Djursholm for its hospitality during a visit to the ``Higher algebraic structures in algebra, topology and geometry'' program, where part of this work was carried out.\n\n\\section{Preliminaries}\nIn this section we review some of the models for the space of orthogonal complex structures on a euclidean space following \\cite[Section IV.9]{LM}, to which we refer for further details. \n\nLet $(V, (\\cdot, \\cdot ))$ be a $2n$--dimensional real inner product space. We will write $$J(V)=\\{ J \\in \\End(V) \\colon J^2=-I, J \\text{ is orthogonal} \\}$$\nfor the space of orthogonal complex structures on $V$. This space naturally has the structure of a complex algebraic variety, given by the isomorphism\n$$ J(V) \\xrightarrow{\\phi} \\Gr_n^{Iso}(V\\otimes \\mathbb{C}) $$\nwith the Grassmannian of $n$--dimensional complex subspaces of $V\\otimes \\mathbb{C}$ which are isotropic with respect to the complex bilinear form on $V\\otimes \\mathbb{C}$ obtained from the inner product on $V$ by linear extension. The map $\\phi$ is defined by\n$$ \\phi(J) = \\{ v\\otimes 1 + Jv \\otimes i \\colon v \\in V\\} $$\n(it assigns to $J$ the plane $V_J^{0,1} \\subset V\\otimes \\mathbb{C}$, which is the $-i$ eigenspace of the complex linear extension of $J$ to $V\\otimes \\mathbb{C}$). \n\nThere is a tautologous complex vector bundle on $J(V)$ defined by \n$$J(V) \\times V \\xrightarrow{\\pi_1} J(V),$$\nwhere the fiber over $J\\in J(V)$ is given the complex structure determined by $J$.\nThe isomorphism $\\phi$ is covered by a bundle map to the dual (or conjugate) tautological bundle over the Grassmannian. \n\n\\begin{lemma}\n\\label{positchern}\nConsider the universal bundle \n$$\nJ(\\mathbb{R}^{2n})=O(2n)\/U(n) \\xrightarrow{i} BU(n) \\to BO(2n).\n$$\nThen\n\\begin{enumerate}[(i)]\n\\item $i$ classifies the tautologous complex vector bundle on $J(\\mathbb{R}^{2n})$.\n\\item $i^*(c_1)$ generates a subgroup of index $2$ in the infinite cyclic second cohomology group of \neach of the two components of $J(\\mathbb{R}^{2n})$.\n\\item $i^*(c_1)$ is positive. In particular, $i^*(c_1)^{\\frac{n^2-n}{2}}$ evaluates on the orientation class of each of the two components of $J(\\mathbb{R}^{2n})$ to a positive integer.\n\\end{enumerate}\n\\end{lemma}\n\\begin{proof}\n\\begin{enumerate}[(i)]\n\\item The universal bundle can be realized by taking $BU(n)=EO(2n)\/U(n)$. The universal bundle over $BU(n)$ is then given by $EO(2n)\\times_{U(n)} \\mathbb{R}^{2n} \\to EO(2n)\/U(n)$, and pulls back along the inclusion of the fiber $i$ to $O(2n) \\times_{U(n)} \\mathbb{R}^{2n} \\to O(2n)\/U(n)$, which is the homogeneous expression of the tautologous bundle. \n\\item The inclusion-induced map $BU(n) \\to BO(2n)$ factors through the\ndouble cover $BSO(2n)\\to BO(2n)$, and the two components of $O(2n)\/U(n)$ are, \nrespectively, the fiber $SO(2n)\/U(n)$ of $BU(n) \\to BSO(2n)$ and the image \nof this fiber under a lift to $BU(n)$ of the non-trivial deck transformation of \n$BSO(2n)$. Therefore it suffices to prove the statement for the component\n$SO(2n)\/U(n)$. This follows from the Serre spectral sequence of the bundle\n$BU(n) \\to BSO(2n)$ (see for instance \\cite[Theorem III.6.11]{MiTo}).\n\n\\item $i^*(c_1)$ is the pullback of $c_1$ of the dual tautological bundle under the embedding \n$$J(\\mathbb{R}^{2n}) \\xrightarrow{\\cong} \\Gr_n^{Iso}(\\mathbb{C}^{2n}) \\subset \\Gr_n(\\mathbb{C}^{2n}).$$\nThe $n^{\\mathrm{th}}$ exterior power of the dual tautological bundle on $\\Gr(\\mathbb{C}^{2n})$ gives the \nPl\\\"ucker embedding of the Grassmannian in projective space. Hence $i^*(c_1)$ is the first\nChern class of a line bundle on $J(\\mathbb{R}^{2n})$ whose sections embed $J(\\mathbb{R}^{2n})$ in projective space and is therefore positive.\\qedhere \n\\end{enumerate}\n\\end{proof}\n\nThe above identification of orthogonal complex structures with isotropic planes in \n$V\\otimes \\mathbb{C}$ leads to another description of the space $J(V)$ which will play an \nimportant role in this paper. \n\nLet $\\mathcal{C}l(V)$ denote the Clifford algebra determined by the quadratic form $q(v)=-\\|v\\|^2$, and let $\\mathbb{C}l(V)=\\mathcal{C}l(V)\\otimes_\\mathbb{R} \\mathbb{C}$ \ndenote its complexification. Let $S_{\\mathbb{C}}$ denote an irreducible ($2^n$--dimensional) $\\mathbb{C}l(V)$-module.\n\nFor each element, i.e. \\emph{spinor}, $\\sigma \\in S_{\\mathbb{C}}$ we have the map $V\\otimes_\\mathbb{R} \\mathbb{C} \\to S_{\\mathbb{C}}$ given by right Clifford multiplication by $\\sigma$. A spinor is said to be \\emph{pure} if the associated kernel is half--dimensional. Let $PS_{\\mathbb{C}} \\subset S_\\mathbb{C}$ denote the subset of pure spinors. As the subspace $\\ker (\\cdot \\sigma) \\subset V\\otimes \\mathbb{C}$ is isotropic\nthere is a natural map from the projectivization of the set of pure spinors to the isotropic Grassmannian\n$$\n\\mathbb{P}( PS_\\mathbb{C} ) \\xrightarrow{\\psi} \\Gr^{Iso}_{2n}(V\\otimes \\mathbb{C})\n$$\ndefined by $[\\sigma] \\mapsto \\ker (\\cdot \\sigma)$. This is a map of algebraic varieties and is in fact an $SO(2n)$-equivariant isomorphism \\cite[Proposition IV.9.7]{LM}.\n\nThe space $J(V)$ has two connected components corresponding to the two possible orientations induced by the complex structure. A choice of orientation for $V$ leads to a decomposition\n$$J(V) = J_+(V) \\coprod J_-(V)$$\nwith $J_+(V)$ the component corresponding to the given orientation. In turn this decomposes the Grassmannian of isotropic subspaces into the components of positive and negative isotropic subspaces. \n\nOn the level of spinors this decomposition takes the following form.\nThe complex volume element in $\\mathbb{C}l(V)$ is the element \n$\\omega_\\mathbb{C} = i^n e_1 \\cdots e_{2n}$, where \n$\\{e_i\\}$ is any oriented orthonormal basis. As $\\omega_{\\mathbb{C}}^2=1$, the volume element decomposes\nthe module $S_C$ into a direct sum of $+1$ and $-1$ eigenspaces \n$$\nS_\\mathbb{C} = S_\\mathbb{C}^+ \\oplus S_\\mathbb{C}^-.\n$$\nThe elements of the summands are called the positive and negative spinors, respectively. \nNote that, since $\\omega_\\mathbb{C}$ anti-commutes with the action of $V \\subset \\mathbb{C}l(V)$, both \n$S_\\mathbb{C}^+$ and $S_\\mathbb{C}^-$ are spin$^c$ representations, called the positive and negative spinor representations respectively. \n\nEvery pure spinor is necessarily either positive or negative and the isomorphisms $\\phi,\\psi$ give rise to isomorphisms of algebraic varieties\n$$\n\\mathbb{P}(PS_\\mathbb{C}^\\pm) \\cong J_\\pm(V).\n$$\nIn dimensions $2n=4,6$ all non-zero spinors are pure \\cite[Remark IV.9.12]{LM} and the isomorphisms identify the spaces\nof orthogonal complex structure with the disjoint union of the projectivization of positive \nand negative spinors. \n\nA point $J \\in J(V)$ gives rise to a useful description (cf. \\cite[Chapter I (5.27)]{LM})\nof the irreducible module $S_\\mathbb{C}$.\nWe will write $\\langle \\cdot, \\cdot \\rangle$ for the Hermitian inner product on the complex vector space $(V,J)$ whose real part is $ (\\cdot, \\cdot )$.\nLet $\\Lambda_\\mathbb{C}^*(V)$ denote the exterior algebra of the complex vector space $(V,J)$.\nContraction of a vector $v \\in V$ with $\\omega \\in \\Lambda_\\mathbb{C}^k(V)$ is determined by the expression\n$$\nv \\lrcorner (w_1 \\wedge \\cdots \\wedge w_k) = \\sum_{j=1}^k (-1)^{j+1}\\langle v, w_j \\rangle w_1 \\wedge \\cdots \\wedge \\widehat{w_j} \\wedge \\cdots \\wedge w_k.\n$$\nThe action $V \\otimes_\\mathbb{R} \\Lambda_\\mathbb{C}^*(V) \\to \\Lambda_\\mathbb{C}^*(V)$ defined by \n\\begin{equation*}\nv \\cdot \\omega = v \\wedge \\omega - v \\lrcorner \\, \\omega\n\\end{equation*}\nsatisfies\n\\begin{equation*}\nv\\cdot(v \\cdot \\omega) = - \\|v\\|^2 \\omega,\n\\end{equation*}\nas one easily checks on an orthonormal basis for $\\Lambda_\\mathbb{C}^*$ having a \nreal multiple of a non-zero $v$ as its first element. The complex linear extension of this action gives $\\Lambda_\\mathbb{C}^*(V)$ the structure of a $\\mathbb{C}l(V)$-module of complex dimension $2^n$. This is the dimension of the irreducible complex $\\mathbb{C}l(V)$-module, so $\\Lambda_\\mathbb{C}^*(V)$ is a convenient description of this module. \n\n\\iffalse\nIndeed, one can consider an orthonormal basis $v_1,Jv_1, \\ldots, v_n, Jv_n$ for $V$ \nwith $v=\\alpha v_1$ and check that \\eqref{clifalg} holds for each $\\omega$ in the standard orthonormal basis for $\\Lambda_\\mathbb{C}^*(V)$:\n$$\nv \\cdot v_{i_1} \\wedge \\cdots \\wedge v_{i_k} = \\begin{cases}\n- \\alpha \\ v_{i_2} \\wedge \\cdots \\wedge v_{i_k} & \\text{ if } i_1=1\\\\\n\\alpha \\ v_{1} \\wedge v_{i_1} \\wedge \\cdots \\wedge v_{i_k} & \\text{ if } i_1 \\neq 1 \n\\end{cases}\n$$\nand hence\n$$\nv \\cdot( v \\cdot v_{i_1} \\wedge \\cdots \\wedge v_{i_k} ) =\n- \\alpha^2 \\ v_{i_1} \\wedge v_{i_2} \\wedge \\cdots \\wedge v_{i_k} = - \\|v\\|^2 v_{i_1} \\wedge \\cdots \\wedge v_{i_k} \n$$\n\\fi\n\n\n\n\n\n\\begin{lemma}\n\\label{plusmin}\nLet $(V,J)$ be an oriented $2n$--dimensional euclidean real vector space with an orthogonal complex structure $J$ compatible with the orientation and let $S_\\mathbb{C}=\\Lambda^*_\\mathbb{C}(V)$ be the irreducible $\\mathbb{C}l(V)$-module described above. Then \n$$\nS_\\mathbb{C}^+ = \\bigoplus_{k \\text{ even }} \\Lambda_\\mathbb{C}^k(V), \\quad \\quad S_\\mathbb{C}^- = \\bigoplus_{k \\text{ odd }} \\Lambda_\\mathbb{C}^k(V).\n$$\n\\end{lemma}\n\\begin{proof}\nLet $e_1, \\ldots, e_n$ be an orthonormal basis for $(V,J)$. Then we can write the complex volume element as \n$$\n\\omega_\\mathbb{C} = i^n e_1 Je_1 \\cdots e_n Je_n .\n$$\nConsider the basis $e_{i_1} \\wedge \\cdots \\wedge e_{i_k}$ for $\\Lambda^k_{\\mathbb{C}}$ with $1\\leq i_1 < \\cdots < i_k \\leq n$. Let $1 \\leq m \\leq n$\nand assume that $m \\not \\in \\{i_1, \\ldots, i_k \\}$. Then\n\\begin{eqnarray*}\n(e_m Je_m) \\cdot e_{i_1} \\wedge \\cdots \\wedge e_{i_k} & = & e_m \\cdot \\left( Je_m \\wedge e_{i_1} \\wedge \\cdots \\wedge e_{i_k} \\right) \\\\\n& = & -\\langle e_m, Je_m \\rangle e_{i_1} \\wedge \\cdots \\wedge e_{i_k} = -i \\ e_{i_1} \\wedge \\cdots \\wedge e_{i_k}.\n\\end{eqnarray*}\nOn the other hand, if $m \\in \\{i_1, \\ldots, i_k\\}$, let $l$ be such that $m=i_l$. Then\n\\begin{eqnarray*}\n(e_m Je_m) \\cdot e_{i_1} \\wedge \\cdots \\wedge e_{i_k} & = & e_m \\cdot \\left( - (-1)^{l-1} \\langle Je_m, e_{i_l} \\rangle e_{i_1} \\wedge \\cdots \\wedge \\widehat{e_{i_l}} \\wedge \\cdots \\wedge e_{i_k} \\right)\\\\\n& = & e_m \\wedge\\left( (-1)^l (-i) e_{i_1} \\wedge \\cdots \\wedge \\widehat{e_{i_l}} \\wedge \\cdots \\wedge e_{i_k} \\right) \\\\\n& = & (-1)^{l-1} (-1)^l(-i) e_{i_1} \\wedge \\cdots \\wedge e_{i_k} = i e_{i_1} \\wedge \\cdots \\wedge e_{i_k}.\n\\end{eqnarray*}\nHence \n$$\n\\omega_\\mathbb{C} \\cdot e_{i_1} \\wedge \\cdots \\wedge e_{i_k} = i^n i^k (-i)^{n-k} e_{i_1} \\wedge \\cdots \\wedge e_{i_k} = (-1)^{2n-k} e_{i_1} \\wedge \\cdots \\wedge e_{i_k},\n$$\nwhich completes the proof.\n\\end{proof}\n\n\\begin{remark}\n\\label{lift}\nFor $(V,J)$ an oriented $2n$--dimensional euclidean real vector space with an orthogonal complex structure $J$ compatible with the orientation, the line in $S^+_\\mathbb{C}$ corresponding to $J\\in J_+(V)$ is $\\Lambda^0_\\mathbb{C}(V)\\subset S_\\mathbb{C}^+$. \nIndeed,\n$$(v \\otimes 1 + w \\otimes i) \\cdot 1 = v+Jw = 0 \\ \\Leftrightarrow \\ w=Jv. $$\n\\end{remark}\n\n\\section{Twistor spaces of four-- and six--manifolds}\n\nIn this section we describe the integral cohomology of the twistor space of (Riemannian) almost complex six--manifolds, along with the integral cohomology of the twistor space of arbitrary oriented (Riemannian) four--manifolds. Finally we compute the Chern classes of the Atiyah--Hitchin--Singer almost complex structure on the latter. \n\n\\subsection{Spinors on almost complex four-- and six--manifolds}\n\nLet $M$ be an oriented Riemannian manifold and let $Z(M)$ denote the space of orthogonal almost complex structures on $M$, called the \\emph{twistor space}. The space \n$Z(M)$ has two components corresponding to the structures which induce the given orientation on $M$ or the opposite orientation. Recall, we \ndenote these by $Z_{\\pm}(M)$, and refer to them as the \\emph{positive} and \\emph{negative} twistor spaces.\n\nThe Atiyah--Hitchin--Singer almost complex structure on $Z(M)$ is defined as follows: the Levi--Civita connection induces a connection on the bundle $Z(M) \\to M$ splitting $TZ(M)$ into\na direct sum of horizontal and vertical subspaces\n$$\nTZ(M) =T^h Z(M) \\oplus T^vZ(M).\n$$\nThe almost complex structure on $T^v Z(M)$ is determined by the algebraic variety structure of the fibers $J(T_x M)$ of $Z(M) \\to M$ explained in Section 2. At a point $J_x$ in the fiber\nover $x\\in M$ the complex structure on $T^h_{J_x} Z(M) = T_x M$ is given\\footnote{The Eells--Salamon almost complex structure is obtained replacing the vertical component of the Atiyah--Hitchin--Singer almost complex structure by its negative; see \\cite[Section 3]{Sa84} for details.} by $J_x$.\n\n\n\nA spin$^c$ structure on $M$ \\cite[Appendix D]{LM} yields a complex spinor \nbundle $S_\\mathbb{C}(M)\\to M$ together with an action\n$$\n\\mathbb{C}l(TM) \\otimes S_\\mathbb{C}(M) \\to S_\\mathbb{C}(M).\n$$\nThe discussion in the previous section then provides a one-to-one correspondence between projectivized pure spinors on $M$ and orthogonal complex structures inducing a given orientation: \n$$\nZ_{\\pm}(M) \\cong \\mathbb{P}( PS_{\\mathbb{C}}^{\\pm}(M)).\n$$\nNow suppose $M$ is given an orthogonal almost complex structure $J$ compatible with the orientation. Then $J$ gives rise to a canonical spin$^c$ structure on $M$ via the group homomomorphism $U(n) \\xrightarrow{\\kappa} \\Spin^c(2n)$, which is the unique\nlift as a group homomorphism in the following diagram\n$$\n\\begin{tikzcd} \n& \\Spin^c(2n) = (\\Spin(2n) \\times S^1)\/\\{\\pm(1,1)\\} \\ar[d, \"\\pi \\times \\delta\"] \\\\\nU(n) \\ar[ur,\"\\kappa\"] \\ar[r,\"i \\times \\det\"] & SO(2n) \\times S^1\n\\end{tikzcd}\n$$\nHere $i$ denotes the inclusion, $\\pi([h, e^{i\\theta}]) = [h]$, and $\\delta([h,e^{i\\theta}])=e^{2i\\theta}$.\n\nAn element $g\\in U(n)$ is diagonalized by some orthonormal basis $(e_1,Je_1, \\ldots, e_n, Je_n)$. If \n$$g=\\mathrm{diag}(e^{i\\theta_1},\\ldots, e^{i\\theta_n}),$$ then $\\kappa(g)= \\left[ \\prod_{k=1}^n \\left( \\cos \\frac{\\theta_k} 2 + i \\sin \\frac{\\theta_k}{2} e_k J e_k\\right), \\ e^{i \\frac{\\sum \\theta_k}{2}} \\right]$ (cf. \\cite[(D.10)]{LM}). Using \nthe formulas for the action of $e_i Je_i$ in the proof of \\Cref{plusmin} we see that the spinor action of $\\kappa(g)$ \non $\\Lambda^*_{\\mathbb{C}}(\\mathbb{R}^{2n})$, where $\\mathbb{R}^{2n}$ is equipped with the complex structure given by $\\mathrm{diag}\\left( \\left(\\begin{smallmatrix} 0 & -1 \\\\ 1 & 0 \\end{smallmatrix}\\right), \\ldots, \\left(\\begin{smallmatrix} 0 & -1 \\\\ 1 & 0 \\end{smallmatrix}\\right) \\right)$, agrees with the standard action of $g$ on this space. We obtain the following result:\n\n\\begin{prop}\n\\label{identification}\nLet $M$ be an oriented Riemannian manifold with an orthogonal almost complex structure $J$ compatible with the orientation. Then we have the following isomorphisms of smooth fiber bundles over $M$:\n\\begin{enumerate}\n\\item If $\\dim(M)=4$, then\n$$ \nZ_+(M) \\cong \\mathbb{P}( \\mathbb{C} \\oplus \\Lambda^2_\\mathbb{C}(TM)), \\quad \\quad Z_{-}(M) \\cong \\mathbb{P}( TM).\n$$\n\\item If $\\dim(M)=6$, then \n$$\nZ_+(M) \\cong \\mathbb{P}( \\mathbb{C} \\oplus \\Lambda^2_\\mathbb{C}(TM)), \\quad \\quad Z_{-}(M) \\cong \\mathbb{P}( TM \\oplus \\Lambda_\\mathbb{C}^3(TM)). \n$$\n\\end{enumerate}\n\\end{prop}\n\n\\begin{remark}\n The Atiyah--Hitchin--Singer and Eells--Salamon almost complex structures on (either) twistor space do not agree with the natural almost complex structure on the projectivization. Indeed, the projection map from the projectivization is complex linear whilst this is not the case for the twistor projection.\n\\end{remark}\n\nThe projective bundle formula now gives the following formulas for the cohomology rings of the components of the twistor space in terms of the \nChern classes of $(TM, J)$. \n\n\\begin{cor}\n\\label{cohomtwis}\nLet $M$ be an oriented Riemannian manifold with an orthogonal almost complex structure $J$ compatible with the orientation. We have the following isomorphisms as algebras over $H^*(M)$:\n\\begin{enumerate}\n\\item If $\\dim(M)=4$, then\n\\begin{align*}\nH^*(Z_+(M)) &\\cong H^*(M)[x]\/(x^2+c_1 x), \\\\ H^*(Z_{-}(M)) &\\cong H^*(M)[x]\/(x^2 + c_1 x + c_2). \\end{align*}\n\\item If $\\dim(M)=6$, then \n\\begin{align*}\nH^*(Z_+(M)) &\\cong H^*(M)[x]\/(x^4 +2c_1x^3 +(c_1^2+c_2) x^2 + (c_1c_2-c_3)x), \\\\ \nH^*(Z_{-}(M)) &\\cong H^*(M)[x]\/(x^4 + 2c_1x^3+ (c_1^2+c_2)x^2 + (c_1c_2+c_3)x). \\end{align*}\n\\end{enumerate}\n\\end{cor}\n\n\\begin{remark} \\begin{itemize} \\item The formulas above in dimension four agree with \\cite[Theorem 11.2]{ESa85}, where it is established that over a K\\\"ahler surface $M$, the positive twistor space is the projectivization of $T^{2,0}M \\oplus \\mathbb{C}$ (note that $T^{2,0}M \\cong \\Lambda_{\\mathbb{C}}^2(TM)$), and the negative twistor space is the projectivization of the holomorphic tangent bundle.\n\n\\item In \\cite[Section 6]{Ev14}, Evans describes the cohomology ring of the positive twistor space of a (not necessarily almost complex) six--manifold, with complex coefficients. The description is in terms of the first Chern class of $T^h(Z_+(M))$. Using \\Cref{chernclasses}, one can check that Evans' description agrees with the one in \\Cref{cohomtwis} in the case of almost complex manifolds. We remark that Evans' computation can quickly be reproduced using naturality in the pullback diagram $$\\begin{tikzcd}\nZ_+(M) \\arrow[d] \\arrow[r] & BU(3) \\arrow[d] \\\\\nM \\arrow[r] & BSO(6) \n\\end{tikzcd}$$\nand expressing $H^*(BU(3);\\mathbb{Q})$ as an $H^*(BSO(6);\\mathbb{Q})$-algebra using the known behavior of the right-hand side vertical map on cohomology.\n\\end{itemize}\n\\end{remark}\n\n\\begin{remark}\\label{cp2bar} In order for the formulas of \\Cref{cohomtwis} (1) to hold, it is crucial to have an almost complex structure \\emph{inducing the given orientation} on the base manifold. For instance, the positive twistor space of $\\overline{\\mathbb{CP}^2}$ (i.e. the complex projective plane with the opposite orientation) with the Fubini--Study metric is the full flag variety $U(3)\/\\left( U(1)\\times U(1) \\times U(1) \\right)$ \\cite[p.217, Example 1]{Sa84}, whose cohomology is given by $$\\mathbb{Z}[x,y,z]\/(x+y+z, xy+xz+yz, xyz) \\cong \\mathbb{Z}[x,y]\/(x^2+xy+y^2, x^2y+xy^2),$$ where $x,y,z$ are in degree two \\cite[Proposition 31.1]{B53}. This ring is not isomorphic to $$\\mathbb{Z}[x,y]\/(y^3, x^2 + kyx)$$ for any integer $k$, so the cohomology of $Z_+(\\overline{\\mathbb{CP}^2})$ can not be expressed as in the first item of \\Cref{cohomtwis} (1). This corresponds to the fact that $\\overline{\\mathbb{CP}^2}$ does not admit an almost complex structure compatible with its orientation (which can of course be seen by other means as well, e.g. Hirzebruch's congruence $\\chi + \\sigma \\equiv 0 \\bmod 4$ for closed almost complex four--manifolds). \\end{remark}\n\n\\subsection{$\\Spin^c(4)$-bundles and twistor spaces of four--dimensional manifolds}\n\nTwistor spaces of oriented Riemannian four--manifolds give interesting examples of almost complex six--manifolds which we will consider in the following sections. In this sub-section we will compute their integral cohomology as well as the Chern classes of\ntheir Atiyah--Hitchin--Singer almost complex structures. \n\nOur computation requires knowledge of the integral cohomology of $B\\Spin^c(4)$. The cohomology of $B\\Spin^c(n)$ is described in detail in \\cite{Du18}. We need only the simple case when $n=4$, so we include an elementary treatment of this case. \n\nOur aim is to compute the cohomology ring of the ``universal twistor space\" over $B\\Spin^c(4)$, namely the bundle of orthogonal complex structures on the fibers of the $4$--plane bundle over $B\\Spin^c(4)$ classified by the canonical map $B\\Spin^c(4) \\to BSO(4)$. Since every oriented four--manifold admits a spin$^c$ structure, naturality will \nyield the cohomology ring of the twistor space.\n\nWe will use unit quaternions to describe the four--dimensional spin groups and orthogonal complex structures. We consider the quaternions $\\mathbb{H}$ as a vector space over $\\mathbb{C}$ via\nright multiplication by $\\mathbb{C} \\subset \\mathbb{H}$, i.e. we consider the identification of $\\mathbb{C}^2$ with $\\mathbb{H}$ given by\n$$ (z_1, z_2) \\mapsto z_1 + jz_2. $$\nThe standard complex structure on $\\mathbb{H}= \\mathbb{R}^4$ is then right multiplication by $i$,\nand $(1,i,j,-k)$ is an oriented basis. \n\nThe unit quaternion $q= w_1 + j w_2$ acts on $\\mathbb{H}$ by left multiplication as \n$$ (w_1 + jw_2) (z_1+jz_2) = (w_1z_1 -\\overline{w_2} z_2) + j(w_2 z_1+z_2 \\overline{w_1} )$$\nwhich corresponds via the identification with $\\mathbb{C}^2$ to the matrix\n$$\n\\left[ \\begin{array}{cc}\nw_1 & -\\overline{w_2} \\\\\nw_2 & \\overline{w_1}\n\\end{array}\n\\right]\n$$\nwith $|w_1|^2 +|w_2|^2=1$. This will be our identification of $Sp(1)$ with $SU(2)$.\n\nThe universal cover of $SO(4)$ is modelled by the map $Sp(1) \\times Sp(1) \\to SO(4)$\ngiven by \n$$ (q_1, q_2) \\mapsto \\left( v \\mapsto q_1 v \\overline{q_2} \\right) $$\nand we will identify\n$$\nSO(4) = (Sp(1) \\times Sp(1))\/\\{\\pm (1,1)\\}.\n$$\nIn these terms, the subgroup $U(2) \\subset SO(4)$ is \n$$\nU(2) = (Sp(1) \\times S^1)\/\\{\\pm (1,1)\\}.\n$$\n\nThe group $\\Spin^c(4)$ is defined as \n$$\n\\Spin^c(4) = (Sp(1) \\times Sp(1) \\times S^1)\/\\{\\pm(1,1,1)\\}.\n$$\nThere are two canonical homomorphisms \n\\begin{equation}\n\\label{canonichom}\nSO(4) \\xleftarrow{\\pi} \\Spin^c(4) \\xrightarrow{\\delta} S^1\n\\end{equation}\ngiven by \n$$ \n\\pi( [q_1,q_2,e^{i\\theta}]) = [q_1,q_2],\n\\quad \\quad \n\\delta( [q_1,q_2, e^{i\\theta}]) = e^{2i\\theta}. \n$$\nThe canonical map $U(2) \\xrightarrow{\\kappa} \\Spin^c(4)$ is the unique lift as a group \nhomomorphism in the diagram\n$$\n\\begin{tikzcd}\n& \\Spin^c(4) \\ar[\"\\pi \\times \\delta\",d] \\\\\nU(2) \\ar[\"\\kappa\",ur] \\ar[\"i\\times \\det\", r] & SO(4)\\times S^1\n\\end{tikzcd}\n$$\nIn terms of the coordinates above, this is given by $\\kappa([q_1,e^{i\\theta}])=[q_1,e^{i\\theta},e^{-i\\theta}]$.\n\nLet $x \\in H^2(BS^1)=H^2(\\mathbb{CP}^\\infty)$ denote the standard generator (the Chern class\nof the dual tautological line bundle on $\\mathbb{CP}^\\infty$) and\n$$\n\\alpha= (B\\delta)^*(x) \\in H^2(B\\Spin^c(4)).\n$$\nWe will write $p_1$ and $\\mathrm{e}$ respectively for the universal Pontryagin class and Euler class in \n$H^*(BSO(4))$.\n\n\\begin{lemma}\n\\label{cohspin}\nLet $\\pi\\colon \\Spin^c(4) \\to SO(4)$ be\nas in \\eqref{canonichom}. There are unique classes $S_1,S_2 \\in H^4(B\\Spin^c(4))$ such\nthat \n\\begin{align*}\n4S_1 &=B\\pi^* p_1 - 2B\\pi^* \\mathrm{e} - \\alpha^2, \\\\ \n4S_2 &=B\\pi^* p_1 + 2B\\pi^* \\mathrm{e} - \\alpha^2.\n\\end{align*}\nMoreover the cohomology ring of $B\\Spin^c(4)$ is a polynomial algebra,\n$$\nH^*(B\\Spin^c(4)) \\cong \\mathbb{Z}[\\alpha,S_1,S_2].\n$$\n\\end{lemma}\n\\begin{proof}\nThe short exact sequence of groups \n$$\nSp(1) \\times Sp(1) \\xrightarrow{\\iota} \\Spin^c(4) \\xrightarrow{\\delta} S^1,\n$$\nwhere $\\iota(q_1,q_2)=[q_1,q_2,1]$, leads to a fiber sequence \n\\begin{equation}\n\\label{fs}\nBSp(1)\\times BSp(1) \\xrightarrow{B\\iota} B\\Spin^c(4) \\xrightarrow{B\\delta} BS^1.\n\\end{equation}\nLet $A,B \\in H^4(BSp(1) \\times BSp(1))$ be the generators which map to \n$x^2 \\in H^4(BS^1)$ under the maps induced by the\nnatural inclusions $e^{i\\theta} \\mapsto (e^{i\\theta},1)$ and $e^{i\\theta} \\mapsto \n(1,e^{i\\theta})$ of $S^1$ in $Sp(1) \\times Sp(1)$.\nBy the Serre spectral sequence of the fibration \\eqref{fs}, any elements in \n$H^4(B\\Spin^c(4))$ mapping to $A,B$ under $B\\iota^*$ together with $\\alpha$ will\nfreely generate the cohomology ring of $B\\Spin^c(4)$.\n\nThe effect of the composition \n$$ BSp(1) \\times BSp(1) \\xrightarrow{B\\iota} B\\Spin^c(4) \\xrightarrow{B\\pi} BSO(4) $$\non degree $4$ cohomology is determined by the homomorphism\n$$\nS^1 \\times S^1 \\xrightarrow{ \\begin{bmatrix} 1 & -1 \\\\ -1 & -1 \\end{bmatrix} } S^1 \\times S^1\n$$\ninduced by $\\pi \\circ \\iota$ on the standard maximal tori.\nWriting $a,b \\in H^2(BS^1 \\times BS^1)$ for the standard generators corresponding to the maximal torus of $SO(4)$, and $x,y$ for \nthe corresponding generators for $Sp(1)\\times Sp(1)$, we have\n$$ a^2+b^2 \\mapsto (x-y)^2+ (-x-y)^2= 2x^2 +2y^2, \\quad \\quad ab \\mapsto -x^2+y^2, $$\nand therefore $p_1,\\mathrm{e} \\in H^4(BSO(4))$ map to $2A + 2B$ and $-A+B$ in $H^4(BSp(1)\\times BSp(1))$ respectively. Therefore\n$$ B\\iota^* B\\pi^* (p_1 -2\\mathrm{e}) = 4A, \\quad B\\iota^* B\\pi^* (p_1+2\\mathrm{e}) = 4B.$$\nIt follows from the short exact sequence \n$$\n0 \\to \\mathbb{Z}\\alpha^2 \\to H^4(B\\Spin^c(4)) \\xrightarrow{B\\iota^*} H^4(BSp(1)\\times BSp(1)) \\to 0 \n$$\nthat there exists $\\lambda \\in \\mathbb{Z}$ such that $B\\pi^*(p_1-2\\mathrm{e}) + \\lambda \\alpha^2$\nis (uniquely) divisible by $4$. \n\nThe composition \n$$\n\\mathbb{CP}^2 \\xrightarrow{\\tau_{\\mathbb{CP}^2}} BU(2) \\xrightarrow{B\\kappa} B\\Spin^c(4) \n\\xrightarrow{B\\delta} BS^1\n$$\nclassifying the second exterior power of the tangent bundle of $\\mathbb{CP}^2$ induces multiplication by $3$ on $H^2$, and hence $(B\\kappa \\circ \\tau_{\\mathbb{CP}^2})^*$ provides a $2$--local splitting of the map $B\\delta^*$ on $H^4$. \n\nThe pullback to $H^4(\\mathbb{CP}^2)$ of \n$B\\pi^*(p_1 - 2\\mathrm{e}) + \\lambda \\alpha^2 \\in H^4(B\\Spin^c(4))$ is\n$(3-6+9\\lambda)$ times the orientation class, and the smallest value of \n$\\lambda$ for which this number is a multiple of $4$ is $\\lambda=-1$. \n\nSince $B\\pi^*(p_1) - 2B\\pi^*(\\mathrm{e}) - \\alpha^2 \\in H^4(B\\Spin^c(4))$ is divisible\nby $4$, we conclude that\n$$\nB\\iota^*\\left( \\frac{ B\\pi^*(p_1) - 2B\\pi^*(\\mathrm{e}) - \\alpha^2 }{4} \\right)=A,\n$$\nand similarly \n$$\nB\\iota^*\\left( \\frac{ B\\pi^*(p_1) + 2B\\pi^*(\\mathrm{e}) - \\alpha^2 }{4} \\right)=B,$$ which completes the proof.\n\\end{proof}\n\nFor four--dimensional $M$, a choice of spin$^c$ structure gives us the following diagram of pullback squares:\n$$\n\\begin{tikzcd}\nZ(M) \\ar[r] \\ar[d] & Z(B\\Spin^c(4)) \\ar[r] \\ar[d] & Z(BSO(4)) \\ar[d] \\\\ M \\ar[r] &\nB\\Spin^c(4) \\ar[r,\"B\\pi\"] & BSO(4) \n\\end{tikzcd}\n$$\nwhere $Z(BG)$ denotes the bundle of orthogonal complex structures on the universal oriented $4$--plane bundle over $BG$ for $G=SO(4)$ and its pullback for $G=\\Spin^c(4)$.\n\nWe will see that each of the two components of $Z(B\\Spin^c(4))$ is the projectivization of a complex plane bundle over $B\\Spin^c(4)$. The projective bundle formula together with naturality will give us the following description of the cohomology ring of $Z(M)$ as an $H^*(M)$-algebra.\n\n\\begin{prop}\n\\label{cohtwist4}\nLet $M$ be an oriented Riemannian four--manifold and $\\alpha \\in H^2(M)$ be an integral\nlift of $w_2(M)$ (classifying the complex line bundle associated to a spin$^c$-structure on $M$). Then there is an isomorphism of $H^*(M)$-algebras\n\\begin{equation}\n\\label{cohtwis4}\nH^*(Z_\\pm(M)) \\cong H^*(M)[x]\/\\left( x^2 + \\alpha x - \\frac{ p_1 \\pm 2\\mathrm{e} - \\alpha^2}{4} \\right).\n\\end{equation}\n\\end{prop}\n\\begin{proof}\nUnder our identification of $\\mathbb{R}^4$ with $\\mathbb{H}$,\nthe orthogonal complex structures on $\\mathbb{R}^4$ compatible with the orientation (respectively, opposite orientation) are given by right (respectively, left) multiplication by a unit imaginary quaternion. The element $[q_1,q_2] \\in SO(4)$ acts on $J_+(\\mathbb{R}^4)$ by \n$$\n[q_1,q_2] u = q_2 u \\overline q_2,\n$$\nand on $J_-(\\mathbb{R}^4)$ by \n$$\n[q_1,q_2] u = q_1 u \\overline q_1.\n$$\nThat is, $SO(4)$ acts on orthogonal complex structures via the two projections to $SO(3)$.\nThe commutative diagrams\n$$\n\\begin{tikzcd}\n\\Spin^c(4) \\arrow[d,\"\\pi\"] \\arrow[r,\"\\chi_+\"] & U(2) \\arrow[d] & & \\left[q_1,q_2,e^{i\\theta}\\right] \\arrow[d, mapsto] \\arrow[r, mapsto] & \\left[q_2, e^{-i\\theta}\\right] \\arrow[d, mapsto] \\\\\nSO(4) \\arrow[r, \"\\pi_{\\mathrm{right}}\"] & SO(3) & & \\left[q_1,q_2\\right] \\arrow[r, mapsto] & \\left[q_2\\right]\n\\end{tikzcd}\n$$\nand\n$$\n\\begin{tikzcd}\n\\Spin^c(4) \\arrow[d,\"\\pi\"] \\arrow[r,\"\\chi_-\"] & U(2) \\arrow[d] & & \\left[q_1,q_2,e^{i\\theta}\\right] \\arrow[d, mapsto] \\arrow[r, mapsto] & \\left[q_1, e^{-i\\theta}\\right] \\arrow[d, mapsto] \\\\\nSO(4) \\arrow[r, \"\\pi_{\\mathrm{left}}\"] & SO(3) & & \\left[q_1,q_2\\right] \\arrow[r, mapsto] & \\left[q_1\\right]\n\\end{tikzcd}\n$$\nallow us to express each component of the bundle of orthogonal complex structures \nassociated to an oriented $4$--plane bundle with a spin$^c$ structure as the projectivization of a complex plane bundle. The formula \\eqref{cohtwis4} will follow from the projective bundle formula once we compute the Chern classes of these plane bundles. By naturality it suffices to compute the images of $c_1, c_2$ under $B\\chi_{\\pm}^*$.\n\nAs the composition $\\Spin^c(4) \\xrightarrow{\\chi_\\pm} U(2) \\xrightarrow{\\det} S^1 $\nequals $\\delta$, we have $B\\chi_{\\pm}^*(c_1) = \\alpha$.\n\nWe will now show that \n$$ \\quad \\quad B\\chi_+^*(c_2) =-S_2, \\quad \\quad B\\chi_-^*(c_2)=-S_1.$$\nIn view of \\Cref{cohspin}, this will complete the proof. The maps \n$$\nSp(1) \\times Sp(1) \\xrightarrow{\\iota} \\Spin^c(4) \\xrightarrow{\\chi_\\pm} U(2)\n$$\nare given respectively by $(q_1,q_2) \\mapsto [q_2,1]$ and $(q_1,q_2) \\mapsto [q_1,1]$ (i.e. they correspond respectively to\nthe inclusions of the right and left copies of $SU(2)$ in $U(2)$). Therefore, with respect to the standard basis for $H^4 (BSp(1)\\times BSp(1))$ used in the proof of \\Cref{cohspin}, we\nhave $B(\\iota \\circ \\chi_+)^*c_2 = -B$ and $B(\\iota\\circ \\chi_-)^*c_2 =-A$. \n\nHence \n$$\nB\\chi_+^*(c_2) = -S_2 + \\lambda \\alpha^2, \\quad \\quad B\\chi_-^*(c_2) = -S_2 + \\mu \\alpha^2, \\quad \\text{ for some } \\lambda, \\mu \\in \\mathbb{Z}.\n$$\nWe can determine the coefficients $\\lambda$ and $\\mu$ by mapping to $H^4(\\mathbb{CP}^2)$ under $\\mathbb{CP}^2 \\xrightarrow{B\\kappa \\circ \\tau_{\\mathbb{CP}^2}} B\\Spin^c(4)$. \nThe compositions\n$$ U(2) \\xrightarrow{\\kappa} \\Spin^c(4) \\xrightarrow{\\chi_{\\pm}} U(2) $$\nare given by \n$$\n[q, e^{i\\theta}] \\mapsto [e^{i\\theta},e^{i\\theta}] \\quad \\text{ and } \\quad [q, e^{i\\theta}] \\mapsto [q,e^{i\\theta}]\n$$\nrespectively. The second map is the identity, while the first map is the representation $U(2) \\xrightarrow{ 1\\oplus \\det } U(2)$ (cf. \\Cref{identification} (1)).\nIt follows that the composition \n$$ \\mathbb{CP}^2 \\to B\\Spin^c(4) \\xrightarrow{B\\chi_+} BU(2) $$\nclassifies the bundle $\\mathbb{C} \\oplus \\Lambda^2 T\\mathbb{CP}^2$, and \n$$ \\mathbb{CP}^2 \\to B\\Spin^c(4) \\xrightarrow{B\\chi_-} BU(2) $$\nclassifies the tangent bundle of $\\mathbb{CP}^2$. Thus $c_2 \\in H^4(BU(2))$ must go to $0 \\in H^4(\\mathbb{CP}^2)$ under the composition $\\mathbb{CP}^2 \\to B\\Spin^c(4) \\xrightarrow{B\\chi_+} BU(2)$, and to $3\\in H^4(\\mathbb{CP}^2)$ \nunder the composition $\\mathbb{CP}^2 \\to B\\Spin^c(4) \\xrightarrow{B\\chi_-} BU(2)$, i.e. \n\\begin{align*}\n- (3 + 6 - 9)\/4 + 9 \\lambda = 0 \\quad \\Leftrightarrow \\quad \\lambda=0, \\quad \\mathrm{and} \\quad -(3-6-9)\/4 + 9\\mu &= 3 \\quad \\Leftrightarrow \\quad \\mu = 0. \\qedhere \\end{align*}\n\\end{proof}\n\nRecall that $T^v Z_{\\pm}(M)$ and $T^hZ_{\\pm}(M)$ denote the vertical and horizontal subbundles of $TZ_{\\pm}(M)$ which are complex vector bundles via the Atiyah--Hitchin--Singer almost complex structure. \n\n\\begin{prop}\\label{chernclasses}\nLet $M$ be an oriented Riemannian four--manifold and $\\alpha \\in H^2(M)$ a choice of lift of $w_2(M)$. Then, in terms of the expression for $H^*(Z_\\pm(M))$ in \\Cref{cohtwist4}, the total Chern class of the standard almost complex structure on $Z_\\pm(M)$ is\n\\begin{equation}\n\\label{chernform}\n1 + (4x+2\\alpha) + (p_1 \\pm 3\\mathrm{e}) \\pm (\\alpha + 2x)\\mathrm{e}.\n\\end{equation}\nMoreover, $c_1(T^vZ_\\pm(M))=c_1(T^hZ_\\pm(M))=\\alpha + 2x$.\n\\end{prop}\n\\begin{proof}\nIt suffices to compute the total Chern classes of the vertical and horizontal sub-bundles of $T Z_{\\pm}(M)$. We saw in the proof of \\Cref{cohtwist4} that $Z_\\pm(M)$ is the projectivization\nof a rank two complex vector bundle $E$ with total Chern class \n$$\n1+ \\alpha - \\frac{p_1 \\pm 2\\mathrm{e} - \\alpha^2}{4}.$$\n\nAs $T^v(\\mathbb{P}(E))\\oplus \\mathbb{C} \\cong \\mathcal{O}_{E^*}(1) \\otimes p^*E$ (where $\\mathbb{P}(E) \\xrightarrow{p} M$ is the projection and $\\mathcal{O}_{E^*}(1)$ \nis the canonical line bundle restricting to $\\mathcal{O}(1)$ on each fiber \\cite[Definition 15.13]{D12}) we \nhave that \n$$\nc_1(T^v(Z_\\pm(M))) = c_1(E) + 2 c_1(\\mathcal{O}_{E^*}(1)) = \\alpha + 2x.\n$$\n\nAs for the horizontal bundle, consider the pullback diagrams \n$$\n\\begin{tikzcd}\nZ_+(M) \\ar[r] \\ar[d] & Z_+(B\\Spin^c(4)) \\ar[r,\"\\tau\"] \\ar[d] & Z_+(BSO(4))=BU(2)\n\\ar[d,\"Bi\"] \\\\\nM \\ar[r] & B\\Spin^c(4) \\ar[r,\"B\\pi\"] & BSO(4) \n\\end{tikzcd}\n$$\nNote that $Z_+(BSO(4))= ESO(4) \\times_{SO(4)} SO(4)\/U(2)=BU(2)$, and under this identification the projection $Z_+(BSO(4)) \\to BSO(4)$ is the map $Bi$ induced by the inclusion $U(2) \\subset SO(4)$. Moreover, the universal bundle $ESO(4) \\times_{U(2)} \\mathbb{R}^4 \\to ESO(4)\/U(2)$\npulls back to $T^h Z_+(M)$ under the composite map $Z_+(M) \\to Z_+(B\\Spin^c(4)) \\xrightarrow{\\tau} BU(2)$ (cf. \\Cref{positchern}).\n\nWe saw in the proof of \\Cref{cohtwist4} that\n$$\nH^*(Z_+(B\\Spin^c(4)))\\cong \\mathbb{Z}[\\alpha,S_1,S_2,x]\/(x^2+\\alpha x - S_2).\n$$\nIn terms of this identification we have $\\tau^*(c_2)=B\\pi^*\\mathrm{e} = -S_1+S_2$\nand \n$$\n\\tau^*(c_1) = \\gamma x+\\lambda \\alpha \\text{ for some } \\gamma, \\lambda \\in \\mathbb{Z}.\n$$\nAs the bundle classified by $\\mathbb{CP}^1 \\cong SO(4)\/U(2) \\to BU(2)$ has $c_1$ equal to two times the orientation class (see \\Cref{positchern}), we have $\\gamma=2$.\nSince $p_1\\in H^4(BSO(4))$ maps to $c_1^2-2c_2$ in $H^4(BU(2))$, and to $2S_1+2S_2 + \\alpha^2$ in $H^4(B\\Spin^c(4))$ we see that \n$$\n(2x+\\lambda \\alpha)^2 +2S_1-2S_2 = 2S_1+2S_2+ \\alpha^2 \\quad \\Leftrightarrow \\quad 4x^2 + 4\\lambda \\alpha x + \\lambda^2 \\alpha^2 = 4S_2+\\alpha^2.\n$$\nHence $\\lambda=1$, yielding the formula \\eqref{chernform} in the case of $Z_+(M)$. \n\nLet $k \\in O(4)$ be an element with determinant $-1$ and let \n$\\varphi \\colon SO(4) \\to SO(4)$ denote conjugation by $k$. As a homogeneous space\nof $SO(4)$ we have $J_-(\\mathbb{R}^4)=SO(4)\/\\varphi(U(2))$. Hence\n$Z_-(BSO(4))= ESO(4) \\times_{SO(4)}\\varphi(U(2)) = B(\\varphi(U(2))$ \nand we have a commutative diagram \n$$\n\\begin{tikzcd}\nZ_-(M) \\ar[r] \\ar[d] & Z_-(B\\Spin^c(4)) \\ar[r,\"\\tau'\"] \\ar[d] \\ar[rr,bend left, \"\\tau\"] & B(\\varphi(U(2)) \\ar[r, \"B\\varphi^{-1}\"] \\ar[d] & BU(2) \\ar[d] \\\\\nM \\ar[r] & B\\Spin^c(4) \\ar[r, \"B\\pi\"] & BSO(4) \\ar[r,\"B\\varphi^{-1}\"] & BSO(4) \n\\end{tikzcd}\n$$\nwith the middle and left-hand squares both pullback squares \nand the right hand square an \nisomorphism of fiber bundles induced by the automorphism $\\varphi^{-1}$.\nNote that $B\\varphi^{-1}$ is covered by an isomorphism between the (complex) universal\nbundles $ESO(4) \\times_{\\varphi(U(2))} \\mathbb{R}^4 \\to ESO(4)\\times_{U(2)} \\mathbb{R}^4$,\nso that the composition $Z_-(M) \\to Z_-(B\\Spin^c(4)) \\xrightarrow{\\tau} BU(2)$\nclassifies $T^h Z_-(M)$.\n\nConsidering the action of $B\\varphi$ on the maximal torus we see that $B\\varphi \\colon\nBSO(4) \\to BSO(4)$ has the following effect on cohomology:\n$$B\\varphi^*(p_i)=p_i, \\quad B\\varphi^* (\\mathrm{e}) = -\\mathrm{e}.$$\n\nArguing as before, we conclude that $\\tau^*(c_2)=-B\\pi^*(\\mathrm{e})=S_1-S_2$ and \n$\\tau^*(c_1)=2x+\\alpha$,\nleading to the formula \\eqref{chernform} in the case of $Z_-(M)$.\n\\end{proof}\n\n\\begin{remark}\\label{hitchin} \\begin{itemize}\n\n\\item The formulas in \\Cref{chernclasses} for $c_2$ and $c_3$ of $Z_-(M)$ differ by a sign from those given in \\cite[p.135]{Hi81}; however, the fundamental class being used in loc. cit. seems to also differ by a sign from the one induced by the Atiyah--Hitchin--Singer almost complex structure on $Z_-(M)$. Hence the values of the Chern numbers given in \\cite[(1.5)]{Hi81} coincide with those obtained with the Chern classes in \\Cref{chernclasses}.\n\n\\item In \\cite[(1.4)]{Hi81}, there is a description of the real cohomology ring of the negative twistor space of a four--manifold $X$, as the free $H^*(X;\\mathbb{R})$--module generated by $h=\\frac{1}{2}c_1(T^v Z_-(X))$ subject only to the relation $h^2 = \\tfrac{1}{2}\\mathrm{e}(X) - \\tfrac{1}{4}p_1(X)$. \nHowever, this description is at odds with the identification of the negative twistor space of $\\mathbb{CP}^2$ as the full flag variety $U(3)\/\\left( U(1)\\times U(1) \\times U(1) \\right)$ \\cite[p.133]{Hi81}, \\cite[p.217, Example 1]{Sa84}. Namely, $H^*(\\mathbb{CP}^2;\\mathbb{R}) \\cong \\mathbb{R}[x]\/(x^3)$, where $\\langle x^2, [\\mathbb{CP}^2] \\rangle = 1$, so $\\mathrm{e}(\\mathbb{CP}^2) = p_1(\\mathbb{CP}^2) = 3x^2$. Therefore the real cohomology of the negative twistor space is,\naccording to \\cite[(1.4)]{Hi81}, $\\mathbb{R}[x,h]\/(x^3, h^2 - \\tfrac{3}{4}x^2)$. One can check directly, however, that this (graded) ring is not isomorphic to the cohomology of the flag variety, i.e. to $\\mathbb{R}[x,h]\/(x^2+xh+h^2, x^2 h + h x^2)$. \n\nIn terms of \\Cref{cohtwist4} and \\Cref{chernclasses}, we have $h=x+\\frac{\\alpha}{2}$ and therefore $h^2=\\frac{1}{4} p_1(x) - \\frac{1}{2} \\mathrm{e}(X)$.\n\\end{itemize}\n\\end{remark}\n\n\\begin{remark} \nLet $M$ be an almost complex Riemannian six--manifold.\nThe fiberwise diffeomorphism $a\\colon Z_+(M) \\to Z_-(M)$ sending\n$J_x \\mapsto -J_x \\in Z(T_xM)$ induces an anti-holomorphic map\nbetween the fibers and hence \n$$\na^*(c_1(T_v(Z_-(M)))) = -c_1(T_v(Z_+(M))).\n$$\nThe spaces $Z_\\pm(M)$ are projectivizations of rank 4 complex vector bundles with first Chern class $2c_1(M)$ (see \\Cref{cohomtwis}), and so as in \\Cref{chernclasses} we see that $c_1(T_v Z_\\pm(M))=2c_1(M)+4x$. Therefore \n$$\na^*(2c_1 + 4x) = -2c_1 - 4x \\Rightarrow a^*(4x) = -4x-4c_1.\n$$\nAs there is no torsion in $H^2$ of the universal example $Z(BU(3))$, it follows that $a^*(x)=-x-c_1$. One can check that $a^*$ yields an isomorphism between the $H^*(M)$-algebras of \\Cref{cohomtwis}.\n\\end{remark}\n\nIn view of the previous remark, from now on we will restrict our attention to the positive twistor space of almost complex Riemannian six--manifolds. \n\n\\section{On the homotopy type of the space of almost complex structures on six--manifolds}\n\nIn this section we study the homotopy type of the components of the space of almost complex structures on connected six-manifolds $M$, complementing our previous treatment \\cite{FGM21} of the case when $c_1=0$. \n\n\\begin{thm}\\label{fibration}\nLet $M$ be an oriented Riemannian manifold of dimension four or six, $J$ an orthogonal almost complex structure on $M$ compatible with the orientation, and $J(M)$ its component in the space of orthogonal almost complex structures. Let $S_{\\mathbb{C}}^+(M)$ be the positive spinor bundle on $M$ determined by $J$. Then the map\n$$\n\\Gamma( S(S_\\mathbb{C}^+(M))) \\to J(M)\n$$ \nis surjective, and for any lift $s$ of $J$,\n$$\n\\Map(M,S^1) \\to \\Gamma( S(S_\\mathbb{C}^+))_s \\to J(M)\n$$\nis a fiber sequence.\n\\end{thm}\n\\begin{proof}\nIdentifying $S_\\mathbb{C}^+(M)$ with $\\oplus_{k \\text{ even}} \\Lambda^k_\\mathbb{C}(TM)$, \\Cref{lift} shows that\nthe constant section $s \\colon M \\to \\Lambda^0_\\mathbb{C}(TM) \\subset S_\\mathbb{C}^+(M)$ defined by \n$s(x)=1$ lifts the section $J$. As $S(S_\\mathbb{C}^+) \\to Z_+(M)$ is a fiberwise fibration over $M$, the map induced on sections is a \nfibration. Since the fiber over $J$ is non-empty, any choice of lift of $J$ identifies the\nfiber with $\\Map(M,S^1)$. \n\\end{proof}\n\n\\begin{remark} The above argument remains valid in all dimensions if one replaces $S(S_{\\mathbb{C}}^+(M))$ with $S(S_{\\mathbb{C}}^+(M)) \\cap PS^+_{\\mathbb{C}}(M)$. \\end{remark}\n\n\nNow let $(M,J)$ be a closed almost complex Riemannian six--manifold with $H^1(M;\\mathbb{Z}) = 0$ satisfying $c_1c_2 - c_3 \\neq 0$. By \\Cref{fibration}, we have the fibration $\\Map(M,S^1) \\to \\Gamma( S(S_C^+(M)))_s \\to J(M)$. Since $H^1(M;\\mathbb{Z}) = 0$, evaluation at a chosen basepoint gives a homotopy equivalence $\\Map(M,S^1) \\xrightarrow{ev} S^1$, so we have a principal fiber sequence $S^1 \\to \\Gamma(S(S_C^+(M)))_s \\to J(M)$.\n\nWe can thus consider instead the fiber sequence \\begin{equation}\\label{fibration2} \\Gamma(S(S_{\\mathbb{C}}^+))_s \\to J(M) \\to BS^1 \\simeq \\mathbb{CP}^\\infty. \\end{equation} Now, $S(S_{\\mathbb{C}}^+)$ is an oriented fiber bundle over $M$ with fiber $S^7$, and hence it is classified by a map $M \\to BAut^+(S^7)$ to the classifying space of orientation-preserving homotopy automorphisms of $S^7$. It is known that $BAut^+(S^7)_{\\mathbb{Q}} \\simeq K(\\mathbb{Q}, 8)$, where the subscript of $\\mathbb{Q}$ denotes (Sullivan) rationalization \\cite[\\textsection 11]{S77}. By \\cite[Theorem 5.3]{M87}, the rationalization of $\\Gamma(S(S_{\\mathbb{C}}^+))_s$ is homotopy equivalent to the space of sections of the fiberwise rationalized $S^7$ bundle over $M$. Since $H^8(M;\\mathbb{Q}) = 0$, this latter bundle is trivial, and hence $\\Gamma(S_{\\mathbb{C}}^+)_{\\mathbb{Q}} \\simeq \\Map(M, S^7_{\\mathbb{Q}})$. Denoting the Betti numbers of $M$ by $b_i$, by Thom's theorem on the space of maps into an Eilenberg--Maclane space, the latter has the homotopy type of $S^1_{\\mathbb{Q}} \\times S^7_{\\mathbb{Q}} \\times K(\\mathbb{Q}, 3)^{b_4} \\times K(\\mathbb{Q}, 4)^{b_3} \\times K(\\mathbb{Q},5)^{b_2}$.\n\nWe can describe the fundamental group of $J(M)$ by using a theorem of Crabb and Sutherland:\n\n\\begin{thm}\\cite[Theorem 2.12(i)]{CS84} Let $M$ be a closed connected $2n$--manifold and $\\xi$ a complex $(n+1)$--plane bundle over $X$. Denote by $N\\xi$ any component of the space of sections of $\\mathbb{P}\\xi$ whose elements lift to sections of $\\xi$. Then $\\pi_1(N\\xi)$ is a central extension $$0 \\to \\mathbb{Z}\/\\left(\\langle c_n(\\xi), [M] \\rangle \\right) \\to \\pi_1(N\\xi) \\to H^1(M) \\to 0.$$ \\end{thm}\n\nBy \\Cref{fibration} we can apply this to $\\xi = S_{\\mathbb{C}}^+(M) \\cong \\mathbb{C} \\oplus \\Lambda_{\\mathbb{C}}^2 TM$, which satisfies $N \\xi = J(M)$. Therefore, the fundamental group of $J(M)$ is given by $\\mathbb{Z}$ modulo $\\int_M c_1c_2-c_3$ (where $c_i = c_i(TM)$), see \\Cref{cohomtwis}. By \\cite{M87}, $J(M)$ is a nilpotent space as it is the space of sections of a fibration with nilpotent fiber (namely $\\mathbb{CP}^3$) over a finite--dimensional base. We may thus rationalize the fibration (\\ref{fibration2}) to obtain the fibration $$(\\Gamma(S(S_{\\mathbb{C}}^+))_s)_{\\mathbb{Q}} \\to J(M)_{\\mathbb{Q}} \\to K(\\mathbb{Q}, 2).$$ Consider the degree one rational class corresponding to the factor $S^1_{\\mathbb{Q}}$ in the fiber. If $c_1c_2 - c_3 \\neq 0$, then since $\\pi_1(J(M)_\\mathbb{Q}) = 0$, this class must hit (a non-zero multiple of) the degree two generator in $K(\\mathbb{Q},2)$ in the Serre spectral sequence. This tells us that a model for $J(M)$ is of the form $$(\\Lambda(x_2, z_1, z_7, z_3^{i}, z_4^{j}, z_5^{k}), dz_1 = x_2, dz_7 \\in (x_2), dz_3^i \\in (x_2), dz_4^j \\in (x_2), dz_5^k \\in (x_2)),$$ where $(x_2)$ denotes the ideal generated by $x_2$, and $i,j,k$ range over sets of size $b_4,b_3,b_2$ respectively.\n\nNotice that such a model is not minimal, and in fact a minimal model is obtained by quotienting out the differential ideal generated by $z_1$. Indeed, by the argument in \\cite[Proposition 2]{VS76} we see that the map $(\\Lambda, d) \\to (\\Lambda\/(z_1, dz_1)\\Lambda, \\bar{d})$ induces an isomorphism on cohomology.\nHere by $(\\Lambda,d)$ we denote the differential graded algebra displayed above, and by $\\bar{d}$ the induced differential on the quotient. We see that $$(\\Lambda\/(z_1, x_2)\\Lambda, \\bar{d}) \\cong (\\Lambda(z_7, z_3^{i}, z_4^{j}, z_5^{k}), \\bar{d}=0),$$ where the right-hand side is minimal. To summarize, we have the following:\n\n\\begin{thm}\\label{Qhomotopy6} Let $M$ be a connected closed six--manifold with $b_1 = 0$ equipped with an almost complex structure $J$ such that $\\int_M c_1c_2-c_3 \\neq 0$. Then the space of almost complex structures on $M$ in the component of $J$ is a nilpotent space with finite cyclic fundamental group and minimal model given by $(\\Lambda(z_7, z_3^{i}, z_4^{j}, z_5^{k}), d = 0)$; here $i,j,k$ range over sets of size $b_4(M),b_3(M),b_2(M)$ ($=b_4(M)$) respectively. In particular, this space is formal. \\qed \\end{thm}\n\nWe emphasize that the above makes no nilpotency assumption on $M$. Alternatively, a model for (a given component of) the space of almost complex structures can be obtained with the Haefliger--Sullivan model for the space of sections of a fibration \\cite[\\textsection 11]{S77}, \\cite{H82}, applied to $\\mathbb{CP}^3 \\to Z_+(M) \\to M$. Our approach above lets one quickly describe the minimal model of $J(M)$ using the geometry of the setup. \n\n\n\\begin{example}\\label{examplesQhomotopy} Using \\Cref{Qhomotopy6}, we immediately obtain the following:\n\n\\begin{enumerate}\n\\item Observe that the space of almost complex structures inducing a given orientation on the connected sum $g(S^3 \\times S^3)$ is connected. By \\Cref{Qhomotopy6}, for $g \\neq 1$, the rationalization of this space is $K(\\mathbb{Q}, 7) \\times K(\\mathbb{Q}, 4)^{2g}$. In particular, the space of almost complex structures on $S^6$ has the same rational homotopy type as $S^7$, i.e. $K(\\mathbb{Q},7)$; cf. \\cite{FGM21} where it is shown that a certain natural inclusion $\\mathbb{RP}^7 \\hookrightarrow J(S^6)$ induces an isomorphism on rational homotopy groups and fundamental groups. (Note that the covering $S^7 \\to \\mathbb{RP}^7$ induces an isomorphism on rational homotopy groups.) \n\nFor $g=1$, one can calculate directly using the Haefliger--Sullivan model that the space of almost complex structures on $S^3 \\times S^3$ has the same rational homotopy type as $S^1 \\times \\mathbb{CP}^3 \\times (\\mathbb{HP}^\\infty)^2$, cf. \\cite[Example 5.4]{FGM21}.\n\n\\item The components of almost complex structures on $\\mathbb{CP}^3$ are parametrized by $c_1 = 2kx$, $c_2 = (2k^2-2)x^2$, where $x$ is the generator of $H^2(\\mathbb{CP}^3)$ such that $\\langle x^3, [\\mathbb{CP}^3]\\rangle = 1$ (i.e. $x = c_1(\\mathcal{O}(1))$ for the standard complex structure). Hence $c_1c_2 - c_3 = 4k^3 - 4k - 4$, which is never zero. Hence every component of almost complex structures has rationalization $K(\\mathbb{Q},7) \\times K(\\mathbb{Q},5) \\times K(\\mathbb{Q},3)$. Contrast this with the trivial $\\mathbb{CP}^3$ bundle over $\\mathbb{CP}^3$, whose (infinitely many) components of sections exhibit two distinct rational homotopy types \\cite[Example 3.4]{MR85}; the space of maps $\\mathbb{CP}^3 \\to \\mathbb{CP}^3$ homotopic to any fixed essential map has rationalization $K(\\mathbb{Q},7)\\times K(\\mathbb{Q},5)\\times K(\\mathbb{Q},3)$. \\end{enumerate} \\end{example}\n\n\n\n\n\n\n\\section{Intersections of almost complex structures on six--manifolds as sections of the twistor space}\n\nWe will now use the results of Section 3 to calculate the homological intersection of two almost complex structures on a given six--manifold $M$, after identifying them with the image of $M$ under the corresponding section of the twistor bundle.\n\n\n\n\\begin{lemma}\\label{poincaredual}\nLet $E \\xrightarrow{\\pi} M$ be a complex vector bundle of rank $n$ over a closed oriented manifold $M$. Let $s \\colon M \\to \\mathbb{P}(E \\oplus \\mathbb{C})$ denote the canonical section given pointwise by $[0: \\cdots : 0 : 1]$.\nThen the Poincar\\'e dual of $s_*[M]$ in $H^*(\\mathbb{P}(E\\oplus \\mathbb{C})) \\cong H^*(M)[x]\/(x^{n+1} + c_1 x^n + \\cdots + c_n x)$ is\n$$\nx^n + c_1x^{n-1} + \\cdots + c_n,\n$$\nwhere $c_i$ denote the Chern classes of $E$.\\footnote{Here the orientation on $\\mathbb{P}(E\\oplus \\mathbb{C})$ is understood to be the one induced by the orientation on $M$ and the canonical orientation on the fiber $\\mathbb{CP}^n$ corresponding to $\\langle x^n, [\\mathbb{CP}^n] \\rangle = 1$.}\n\\end{lemma}\n\\begin{proof}\nThe Poincar\\'e dual to $s_*[M]$ is the image of the Thom class of the normal bundle to the submanifold $s(M) \\subset \\mathbb{P}(E \\oplus \\mathbb{C})$ under the first map below in the long exact sequence of a pair,\n$$\nH^{2n}(\\mathbb{P}(E \\oplus \\mathbb{C}), \\mathbb{P}(E \\oplus \\mathbb{C}) \\setminus s(M)) \\to H^{2n}(\\mathbb{P}(E \\oplus \\mathbb{C})) \\to H^{2n} (\\mathbb{P}(E \\oplus \\mathbb{C}) \\setminus s(M)),\n$$\n\nwhere $H^{2n}(\\mathbb{P}(E \\oplus \\mathbb{C}), \\mathbb{P}(E \\oplus \\mathbb{C}) \\setminus s(M))$ has been identified with $H^{2n}(U, U \\setminus s(M))$ for some tubular neighborhood $U$ of $s(M)$ via excision; see \\cite[\\textsection 6.11]{Br}. This is a non-zero class, as $s_*[M]$ is non-zero since it projects to $[M]$. \n\nNow notice that $\\mathbb{P}(E \\oplus \\mathbb{C}) \\setminus s(M)$ deformation retracts to $\\mathbb{P}(E)$. Therefore the effect of the second map on cohomology is the natural quotient\n$$ H^{2n}(M)[x]\/(x^{n+1} + c_1 x^n + \\cdots + c_n x) \\to H^{2n}(M)[x]\/(x^n + c_1 x^{n-1} + \\cdots + c_n), $$\nand thus the kernel is generated by $x^n + c_1x^{n-1} + \\cdots + c_n$. Hence the Thom class maps to $x^n + c_1x^{n-1} + \\cdots + c_n$ up to sign. To check the sign, we restrict to a fiber and evaluate against the fundamental class $[\\mathbb{CP}^n]$. Since the Thom class is the orientation of the normal bundle, which is given by the orientation of the fibers, and $\\langle x^n, [\\mathbb{CP}^n] \\rangle = 1$, we see that the sign is positive. \\end{proof}\n\n\n\\begin{thm}\\label{selfintersection}\n\nLet $s$ be a section of the positive twistor bundle over a closed Riemannian six--manifold $M$, and give $M$ the orientation determined by $s$. Then the homological self-intersection number $s_*[M] \\cdot s_*[M]$ of $s(M)$ in $Z_+(M)$ is given by $\\int_M c_1c_2 - c_3$, where the $c_i$ are the Chern classes of the almost complex structure determined by $s$.\n\n\\end{thm}\n\n\\begin{proof} In terms of the identification in \\Cref{identification}, $s$ is the canonical section of $\\mathbb{P}(S_{\\mathbb{C}}^+) = \\mathbb{P}(\\Lambda_\\mathbb{C}^2 TM \\oplus \\mathbb{C})$ (see the proof of \\Cref{fibration}), where $TM$ is equipped with the complex structure determined by $s$. To compute the homological self-intersection of $s(M)$, we integrate the square of the expression obtained in \\Cref{poincaredual} for its Poincar\\'e dual in $Z_+(M)$. We use \\Cref{cohomtwis}, and observe that since $x(x^3 + c_1(S_{\\mathbb{C}}^+)x^2 + c_2(S_{\\mathbb{C}}^+)x + c_3(S_{\\mathbb{C}}^+)) = 0$ in $H^*(Z_+(M))$, we have \\begin{align*} (x^3 + c_1(S_{\\mathbb{C}}^+)x^2 + c_2(S_{\\mathbb{C}}^+)x + c_3(S_{\\mathbb{C}}^+))^2 &= c_3(S_{\\mathbb{C}}^+)(x^3 + c_1(S_{\\mathbb{C}}^+)x^2 + c_2(S_{\\mathbb{C}}^+)x + c_3(S_{\\mathbb{C}}^+)) \\\\ &= c_3(S_{\\mathbb{C}}^+) x^3 = (c_1c_2 - c_3)x^3. \\qedhere \\end{align*} \\end{proof} \n\nUsing \\Cref{selfintersection}, we obtain the following:\n\n\\begin{example} \n\\label{intersectiontwistor4d} \\begin{enumerate} \\item\nFor any closed oriented Riemannian four--manifold $M$, by \\Cref{chernclasses}, we have the following Chern numbers of the Atiyah--Hitchin--Singer almost complex structure on $Z_+(M)$:\n\\begin{align*} \n\\int_{Z_+(M)} c_1(Z_+(M))c_2(Z_+(M)) &= \\int_{Z_+(M)} (4x+2\\alpha)(p_1+3\\mathrm{e}) \\\\ &= \\left( \\int_{\\mathbb{CP}^1}4x \\right)\\left( \\int_{M} (p_1(M)+3\\mathrm{e}(M)) \\right) = 12(\\sigma(M)+\\chi(M)), \\\\\n\\int_{Z_+(M)} c_3(Z_+(M)) & = \\int_{Z_+(M)} (2x+\\alpha)\\mathrm{e} = 2 \\chi(M).\n\\end{align*}\n\nHence the self-intersection of the Atiyah--Hitchin--Singer almost complex structure on $Z_+(M)$ in $Z_+(Z_+(M))$ is $12\\sigma(M) + 10\\chi(M)$. \n\nBy \\cite[Lemma 3]{Ar97}, closed oriented four--manifolds admitting a maximally non-integrable almost complex structure satisfy $5\\chi + 6\\sigma = 0$. Hence for these manifolds, the corresponding self-intersection number is zero.\n\n\\item By a theorem of Taubes \\cite[Theorem 1.1]{T92}, given any closed oriented four--manifold $M$, for every large enough $k$ the manifold $N = \\overline{M} \\# k \\mathbb{CP}^2$ carries a self-dual metric. Hence its negative twistor space $X = Z_-(N)$ is a complex manifold \\cite[Theorem 4.1]{AHS78}. It satisfies \\begin{align*} \\int_X c_1(X)c_2(X) = 12(\\chi(N) - \\sigma(N)), \\quad \\int_X c_3(X) = 2\\chi(N).\\end{align*} \n\nIndeed, we obtain this again from \\Cref{chernclasses}; namely \\begin{align*} \\int_X c_1(X)c_2(X) &= \\int_X 2(\\alpha +2x)(p_1(N)-3\\mathrm{e}(N)) = \\left( \\int_{\\mathbb{CP}^1}4x \\right) \\left( \\int_{\\overline{N}} (p_1(N)-3\\mathrm{e}(N)) \\right) \\\\ &= -12(\\sigma(N)-\\chi(N)).\\end{align*} This agrees with \\cite[(1.5)]{Hi81}. Alternatively, from \\cite[Section 4]{EaSi93} we see that the holomorphic Euler characteristic of $X$ is given by $1 - b_1(N) + b_2^+(N)$. Since $\\chi(N) = 2+b_2^+(N) +b_2^-(N) - 2b_1(N)$ and $\\sigma(N) = b_2^+(N) - b_2^-(N)$, we have $\\tfrac{1}{2}(\\chi(N) - \\sigma(N)) = 1 - b_1+b_2^-$, which equals the Todd genus $\\int_X \\tfrac{1}{24}c_1c_2(X)$. The Euler characteristic of $X$ is twice that of $N$, as seen immediately e.g. using the Leray--Hirsch theorem.\n\nFrom here we obtain $$\\int_X c_1(X)c_2(X) - c_3(X) = 10\\chi(M) + 12\\sigma(M) - 2k.$$ Hence for any $M$, for large enough $k$ we obtain compact complex threefolds $X$ with negative homological self-intersection in their own positive twistor space. \n\\end{enumerate}\n\\end{example}\n\n\n\\begin{example}\\label{exampleselfintersection}\n\\begin{enumerate}\n\\item For the connected sum $g(S^3 \\times S^3)$, the self-intersection number of any almost complex structure in $Z_+(g(S^3 \\times S^3))$ is $2g-2$. In particular, for $S^6$ we have $-2$.\n\\item $S^2 \\times S^4$ admits a unique homotopy class of almost complex structures for every choice of $c_1 = 2k\\alpha$, where $\\alpha$ generates $H^2$. Since $p_1 = 0$ we see that $c_2 = 0$ for any $k \\in \\mathbb{Z}$, and so the self-intersection is $-4$ for any homotopy class of almost complex structure. Likewise, for $g\\left( S^2 \\times S^4 \\right)$, the self-intersection of any almost complex structure is $-2g-2$.\n\\item Recall that the homotopy classes of almost complex structures on $\\mathbb{CP}^3$ are parametrized by $c_1 = 2kx$, $c_2 = (2k^2-2)x^2$. The self-intersection numbers are given by $4k^3 - 4k - 4$; in particular, for the standard complex structure it is 20.\n\n\\item To obtain more examples of compact complex threefolds with negative self-intersection, one can blow up any given compact complex threefold $X$ at a point sufficiently many times. Indeed, the blowup at one point, diffeomorphic to $X \\# \\overline{\\mathbb{CP}^3}$, satisfies $\\int_{X \\# \\overline{\\mathbb{CP}^3}} c_1c_2(X \\# \\overline{\\mathbb{CP}^3}) = \\int_X c_1c_2(X)$ by invariance of the Todd genus under bimeromorphisms, and the Euler characteristic is two larger than that of $X$. Note that if $X$ is K\\\"ahler, this gives examples of K\\\"ahler threefolds with negative self-intersection.\n\\item In \\cite{Le99}, LeBrun builds examples of compact complex threefolds $X_m$, $m>0$, each diffeomorphic to $K3\\times S^2$, with $\\int_{X_m} c_1c_2(X_m) = 48m$. Hence the homological self-intersection number is given by $48(m-1)$.\n\\item By \\cite[Corollary 3.1]{GS14}, for a connected symplectic six--manifold $M$ with a Hamiltonian circle action with isolated fixed points, we have $\\int_M c_1c_2 = 24$ and so $\\int_M c_1c_2 - c_3 = 24-\\chi(M)$. In particular, this formula applies to toric six--manifolds.\n\n\\end{enumerate} \\end{example}\n \nRecall the following theorem of Michelsohn, Salamon, Atiyah--Hitchin--Singer:\n\n\\begin{thm}(\\cite[Theorem 9.11]{LM}\\label{sectiontheorem}, \\cite[Theorem 1]{Sa95}) A section $s$ of the positive twistor space $Z_+(M) \\to M$ is pseudoholomorphic, with respect to the almost complex structure $J$ corresponding to $s$ on $M$ and the Atiyah--Hitchin--Singer almost complex structure on $Z_+(M)$, if and only if $J$ is integrable. \\end{thm}\n\nNow suppose we have an integrable orthogonal $J$ on a Riemannian six--manifold $M$. Then $s$ gives us an embedding of $M$ into $Z_+(M)$ as an almost complex submanifold. If we were able to perturb $s(M)$ to another almost complex submanifold that intersects $s(M)$ transversally, then the homological intersection number $s_*[M] \\cdot s_*[M]$ would have to be $\\geq 0$. A way to obtain perturbations of $s(M)$ to almost complex submanifolds is by translating $J$ by an isometry of $(M,g)$, but any perturbation to a transverse representative would do. Note that it is unique to dimension six that $s_*[M] \\cdot s_*[M]$ inside $Z_+(M)$ gives an integer. \n\n\\begin{cor}\\label{deform} Suppose a closed Riemannian six--manifold $M$ carries an integrable complex structure, corresponding to a section $s$ of $Z_+(M)$, with $\\int_M c_1c_2 - c_3 < 0$. Then there is no representative of the homology class $s_*[M]$ given by an almost complex submanifold of $Z_+(M)$ which intersects $s(M)$ transversally. \\end{cor}\n\n\\begin{example} Consider $S^6$ with the round metric. Take the canonical almost complex structure induced by the octonions, and consider its orbit under the action of the isometry group $SO(7)$, diffeomorphic to $\\mathbb{RP}^7$. After identifying the twistor space of round $S^6$ with the Grassmannian of oriented 2--planes in $\\mathbb{R}^8$, Calabi and Gluck \\cite{CG} show that these ``octonion'' $J$'s send $S^6$ to the family of 2--planes of the form $(o, v)$, where $o$ is a fixed unit octonion depending on $J$ (so, the image of $S^6$ is the unit sphere in the hyperplane orthogonal to a given line in $\\mathbb{R}^8$.) Two such nearby families intersect transversally. Therefore, the $-2$ homological self-intersection obtained in \\Cref{exampleselfintersection} shows the octonion $J$'s are not integrable. Of course, this also follows by a direct computation of the Nijenhuis tensor, and the result is a special case of the classical theorem of Blanchard \\cite{Bl53} and LeBrun \\cite{Le87} that there is no integrable complex structure on $S^6$ orthogonal with respect to the round metric. \\end{example}\n\nIn order to study intersections of almost complex structures in different components of the space of sections of the twistor space we will now analyze the dependence of our formula for the cohomology (\\Cref{cohomtwis}) on the choice of almost complex structure. \n\nConsider the map of fibrations\n\\begin{equation}\n\\label{comparison}\n\\begin{tikzcd}\n\\mathbb{CP}^3 \\ar[r,\"j\"] \\ar[d] & \\mathbb{CP}^\\infty \\ar[d] \\\\\nBU(3) \\ar[r,\"B\\kappa\"] \\ar[d] & B\\Spin^c(6)\\ar[d] \\\\\nBSO(6) \\ar[r,\"=\"] & BSO(6) \n\\end{tikzcd}\n\\end{equation}\nAs the canonical map $\\kappa \\colon U(3) \\to \\Spin^c(6)$ is an isomorphism on $\\pi_1$, we see \nthat $j$ is an isomorphism on $\\pi_2$ and hence the $5$--lemma implies that $B\\kappa$ is a \n$7$--equivalence. Therefore the set of isomorphism classes of almost complex structures on six--manifolds is in natural bijective correspondence with the set of isomorphism classes of spin$^c$ structures via the canonical map from the former to the latter.\n\nThe set of isomorphism classes of spin$^c$-structures on a manifold $M$ is a torsor over the group $H^2(M)$\nof isomorphism classes of complex line bundles \n(corresponding to the action of the fiber on\nthe principal fibration along the right-hand column of \\eqref{comparison}). Letting \n$[s]$ denote the spin$^c$ structure associated to the almost complex structure $s\\colon \nM \\to Z_+(M)$, and writing $a \\cdot [s]$ for the action of the cohomology class \n$a \\in H^2(M)$ on $[s]$, we have the following result:\n\n\\begin{lemma}\nLet $M$ be an oriented Riemannian six--manifold and let $s,s'\\colon M \\to Z_+(M)$ be \ntwo almost complex structures on $M$ compatible with the orientation of $M$. \nLet $a \\in H^2(M)$ be (the unique cohomology class) such that $[s']=a\\cdot [s]$.\nThen the canonical isomorphism between the expressions for $H^*(Z_+(M))$ given in \\Cref{cohomtwis} in terms of $s,s'$ is given by\n$$\nx' \\mapsto x - a. \n$$\n\\end{lemma}\n\\begin{proof}\nLet $E$ and $E'$ be the positive spinor bundles associated to the spin$^c$ structures\n$[s]$ and $[s']$ respectively, and let $L$ denote a complex line bundle with $c_1(L)=a$.\n\nThe relation $a \\cdot [s]=[s']$ implies that there is an isomorphism \n$$\\psi \\colon L \\otimes E \\to E'.$$\nThe kernel in $T_x M \\otimes \\mathbb{C}$ of right multiplication by a positive spinor \n$v \\in E_x$ is the same as the kernel of right multiplication by $\\lambda \\otimes v \\in \nL_x \\otimes E_x$ for any $\\lambda \\neq 0$, so the canonical isomorphism given by the \ncomposition\n$$\n\\mathbb{P}(L\\otimes E) \\xrightarrow{\\phi'} Z_+(M) \\xrightarrow{\\phi^{-1}} \\mathbb{P}(E)\n$$\nis the obvious one sending the line $L \\otimes (\\mathbb{C} v)$ to $\\mathbb{C} v$. \n\nWe conclude that on $Z_+(M)$ the tautological (Hopf) line bundles $H$ and $H'$ coming \nrespectively from the identifications with $\\mathbb{P}(E)$ and $\\mathbb{P}(E')$ satisfy\nthe relation \n$$\nH' \\cong H \\otimes L.\n$$\nSince $x'=c_1(H'^*)$ and $x=c_1(H^*)$, this completes the proof.\n\\end{proof}\n\nGiven a spin$^c$ structure $[s]$ we will write $c_1([s])$ for the Chern class of \nthe line bundle classified by the projection $B\\Spin^c(2n) \\xrightarrow{B\\delta} BS^1$. \nNote that $c_1( a\\cdot [s]) = 2a + c_1([s])$ so the difference class $a \\in H^2(M)$ \nbetween two almost complex structures $s,s'$ is a specific ``square root'' of the \ndifference $c_1'-c_1$. We can suggestively write \n\\begin{equation}\n\\label{div2}\nx' = x + \\frac{c_1-c_1'}{2},\n\\end{equation}\nwhich is unambiguous on rational cohomology (or when there is no $2$--torsion in $H^2(M)$).\n\n\\begin{remark}\nIf we use $s\\colon M \\to Z_+(M)$ to write \n$$\nH^*(Z_+(M)) = H^*(M)[x]\/(x^4 + 2c_1 x^3 + (c_1^2+c_2)x^2 + (c_1c_2-c_3) x),\n$$\nthen $s^*(x)=0$. This follows from \\Cref{lift} which implies that \nthe pullback by $s$ of the Hopf bundle over $\\mathbb P(E)$ is trivial. Using the isomorphism $H^2(Z_+(M)) \\xrightarrow{i^*\\oplus s^*} H^2(\\mathbb{CP}^3) \\oplus H^2(M)$ one sees that the first Chern class of the horizontal\nplane bundle on $Z_+(M)$ is\\footnote{This computation also follows from the arguments used in the proof of \\Cref{chernclasses}.} $c_1(M)+2x$ (for any choice of almost complex structure) leading again to \\eqref{div2}.\n\\end{remark}\n\n\n\\iffalse\nBefore considering intersections, we first comment on the various possible presentations of this cohomology. First we record the following result:\n\n\\begin{prop}\\label{pullbackx}\nLet $M$ be a Riemannian oriented six--manifold and $Z_+(M) \\to M$ be its positive twistor space. Let $s \\colon M \\to Z_+(M)$ be an almost \ncomplex structure and use it to write \n$$\nH^*(Z_+(M)) = H^*(M)[x]\/(x^4 + 2c_1 x^3 + (c_1^2+c_2)x^2 + (c_1c_2-c_3) x).\n$$\nThen $s^*(x)=0$.\n\\end{prop}\n\\begin{proof}\nIn the projective bundle formula, $x$ is $c_1$ of the dual tautological line bundle over the projectivized positive spinors. Its pullback under $s$\nis $c_1$ of the line bundle on $M$ whose fiber over $x$ is the dual of the line of positive spinors determined by the almost complex \nstructure on $x$. It follows from \\Cref{lift} that this line bundle is trivial (this is why $s$ always lifts to a section of the positive spinor bundle).\n\\end{proof}\n\nConsider the pullback square \n$$ \\begin{tikzcd}\n\\mathbb{CP}^3 \\arrow[r, \"=\"] \\arrow[d, \"i\"'] & \\mathbb{CP}^3 \\arrow[d, \"j\"] \\\\\nZ_+(M) \\arrow[d, \"\\pi\"'] \\arrow[r, \"\\tau\"] & BU(3) \\arrow[d] \\\\\nM \\arrow[r] \\arrow[ru, \"\\tilde{s}\"'] \\arrow[u, \"s\" description, shift right=2] & BSO(6) \n\\end{tikzcd} $$\n\ngiven by a choice of almost complex structure on $M$.\nLet us write $C_1$ for the first Chern class in $H^2(BU(3))$ to distinguish it from the Chern class $c_1$ of the almost complex structure on $M$\ndetermined by the lift $\\tilde{s} = fs$. Let $\\hat{x}$ denote the class $c_1(\\mathcal{O}(1)) \\in H^2(\\mathbb{CP}^3)$. Recall that $\\tau$ classifies the horizontal bundle on $Z_+(M)$, see the proof of \\Cref{cohomtwis}.\n\nWe show that $\\tau^*(C_1) = c_1 + 2x$; we emphasize that $x$ depends on the chosen almost complex structure on $M$. Notice that $i^*x = \\hat{x}$ and $i^*\\tau^*(C_1) = j^*(C_1) = 2\\hat{x}$ by \\Cref{positchern}. We have $\\tau^*(C_1) = 2x + \\pi^*(b)$ for some $b \\in H^2(M)$\nand $s^*\\tau^*(C_1) = \\tilde{s}^*C_1 = c_1$. Hence $c_1 = s^*\\tau^*(C_1) = s^*(2x) + s^*\\pi^*(b)$. By \\Cref{pullbackx}, we have $s^*(x) = 0$ and hence $b = c_1$, giving us $\\tau^*(C_1) = 2x + c_1$ (here, as usual, we write $c_1$ instead of $\\pi^*(c_1)$). \n\n\nSince this is true for any choice of almost complex structure, given another choice $s'$ we must have $c_1 + 2x = \\tau^*(C_1) = c_1' + 2x'$, where $x'$ is the class analogous to $x$ for the almost complex structure determined by $s'$. Hence, $2(x'-x) = c_1 - c_1'$, which we choose to capture by denoting $x' - x$ by $\\tfrac{1}{2}(c_1-c_1')$ (note that on its own, the latter expression is not necessarily well-defined, as there might be two--torsion in the cohomology). This allows us to suggestively write\n\\begin{equation}\\label{x'x}\nx' = x + \\tfrac{1}{2}(c_1 - c_1').\n\\end{equation}\n\nDenoting for simplicity $A = x'-x = \\tfrac{1}{2}(c_1-c_1')$, by \\Cref{cohomtwis} the formula for $H^*(Z_+(M))$ can be written in terms of the new generator $x'=x+A$ as\n$$\nH^*(M)[x']\/((x'-A)^4 + 2c_1(x'-A)^3 + (c_1^2+ c_2)(x'-A)^2 + (c_1c_2 - c_3)(x'-A).\n$$\nOn the other hand, the cohomology must equal\n$$\nH^*(M)[x']\/((x')^4+ 2c_1' (x')^3 + (c_1'^2 + c_2') (x')^2 + (c_1' c_2' -c_3') x' .\n$$\n\nLooking at the equalities between the coefficients of powers of $x'$ in the expressions above gives us $A = \\frac 1 2 (c_1-c_1')$ (true by definition), $c_1^2 - 2c_2 = c_1'^2 - 2c_2'$ (both equal the first Pontryagin class of $M$), and $c_3 = c_3'$ (both equal the Euler class).\n\n\\begin{remark}\nTwo different almost complex structures give rise to different positive spinor bundles with the same projectivization, as we have been using above. This is explained on the level of structure groups by the commutativity of the following diagram (given the formula obtained in \\Cref{plusmin} for the positive spinor bundle):\n$$\n\\xymatrix{\nU(3) \\ar[r]^{\\Lambda^2 \\oplus \\Id} \\ar[d] & U(4) \\ar[d] \\\\\nSO(6) \\ar[r] & PSO(6) \\cong PU(4)\n}\n$$\nwhere the identification on the bottom-right comes from the exceptional isomorphism $SU(4)\\cong \\Spin(6)$. \n\\end{remark}\n\\fi \n\n\\begin{thm}\\label{intersection} Let $J$ and $J'$ be two orthogonal almost complex structures inducing the same orientation on a closed Riemannian six--manifold $M$, corresponding to sections $s$ and $s'$ of the twistor bundle. Denote by $c_i, c_i'$ their respective Chern classes. Then the intersection number $s_*[M] \\cdot s'_*[M]$ in $Z_+(M)$ is given by $$\\int_M \\tfrac{1}{8}\\left( c_1^3 + c_1^2 c_1' - c_1c_1'^2 - c_1'^3 \\right) + \\tfrac{1}{2} \\left( c_1 c_2' + c_1' c_2' \\right) - c_3.$$\n\\end{thm}\n\n\\begin{proof}\nBy \\Cref{cohomtwis}, the presentation of $H^*(Z_+(M))$ with reference to $J$ is given by $$H^*(M)[x]\/(x^4 + 2c_1x^3 + (c_1^2+c_2)x^2 + (c_1c_2-c_3)x),$$ and with reference to $J'$ it is given by $$H^*(M)[x']\/((x')^4 + 2c_1'(x')^3 + ((c_1')^2 + c_2')(x')^2 + (c_1'c_2'-c_3')x').$$ Combining \\Cref{cohomtwis} with \\Cref{poincaredual}, we have that the Poincar\\'e dual of $s_*[M]$ is given by $$x^3 + 2c_1x^2 + (c_1^2+c_2)x + (c_1c_2-c_3),$$ and the Poincar\\'e dual of $s'_*[M]$ is given by $$(x')^3 + 2c_1'(x')^2 + ((c_1')^2 + c_2')x' + c_1'c_2'-c_3'.$$ Recall from \\eqref{div2} that $x' = x + \\tfrac{1}{2}(c_1 - c_1')$. (Our calculation will be insensitive to torsion, so we may in fact work in the rational cohomology ring where there is no ambiguity in writing $\\tfrac{1}{2}(c_1 - c_1')$.) Using this to rewrite the expression for $s'_*[M]$, and multiplying with $s_*[M]$, yields $$x^3\\left( \\tfrac{1}{8}\\left( c_1^3 + c_1^2 c_1' - c_1c_1'^2 - c_1'^3 \\right) + \\tfrac{1}{2} \\left( c_1 c_2' + c_1' c_2' \\right) - c_3' \\right).$$ Pairing with the fundamental class of $Z_+(M)$ gives the result. \\end{proof}\n\n\n\\begin{remark} The expression for the intersection number in \\Cref{intersection} is symmetric in $J$ and $J'$ as expected, which can be verified by using $c_1^2 - 2c_2 = p_1 = c_1'^2 - 2c_2'$ and $c_3 = c_3'$. \\end{remark}\n\n\\begin{example} Let $J$ and $J'$ be two almost complex structures on $\\mathbb{CP}^3$, with Chern classes $c_i$ and $c_i'$. Then $c_1 = 2kx, c_2 = (2k^2 - 2)x^2, c_3 = 4x^3$ and $c_1' = 2\\ell x, c_2' = (2\\ell^2 - 2)x^2, c_3' = 4x^3$, where $k, \\ell$ are integers. From \\Cref{intersection} we get that $J$ and $J'$, thought of as sections of the twistor bundle, have homological self-intersection given by $$k^3 + k^2 \\ell + k \\ell^2 + \\ell^3 - 2k - 2\\ell - 4.$$ In particular, taking $J$ to be the standard complex structure, lying in the component determined by $k = 2$, we have that the homological intersection with any $J'$ with $\\ell < 0$ is negative.\n\\end{example}\n\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\nPresently, there exists an interest in the study of the effects of the spin in\nthe trajectory of test particles in rotating gravitational fields. The\nimportance of this topic increases when dealing with phenomena of astrophysics\nsuch as accretion discs in rotating black holes \\cite{tanaka 1996},\nGravitomagnetics Effects \\cite{faruque2004} or gravitational waves induced by\nspinning particles orbiting a rotating black hole \\cite{mino}. Therefore, we\nshall work the equations of motion for test particles in a weak Kerr metric\nwhich will be integrated numerically in the particular case when the test\nparticles are orbiting circularlly with the purpose of studying the effects of\nspin in the trajectories of test particles in rotating gravitational fields.\n\nThe motion of particles in a gravitational field is given by the geodesics\nequation. The solution to this equation depends on the problem, and therefore\nthere are different methods for its solution \\cite{carter} \\cite{abramowicz}.\nBasically, we take two cases in motion of test particles in a gravitational\nfield of a rotating mass. The first case describes the trajectory of a\nspinless test particle, and the second one the trajectory of a spinning test\nparticle in a weak Kerr metric. For the second case a representation is used\nthat does not include the third-order derivatives of the coordinates, and\nyields the equations of motion for a spinning test particle in a gravitational\nfield without any restrictions on its velocity and spin orientations\n\\cite{plyatsko}.\n\nFor the first case, authors as Tanaka \\textit{et al. } \\cite{tanaka 1996}\nyield the set of equations of motion for orbiting spinless test particles. In\nthis case the equations of motion for the spinless test particle are\nconsidered both in the equatorial \\cite{bardeen}, \\cite{wilkins},\n\\cite{calvani}, and the non-equatorial plane \\cite{wilkins}, \\cite{stog},\n\\cite{teo} (Kheng, L., Perng, S., Sze Jackson, T.: Massive Particle Orbits\nAround Kerr Black Holes. Unpublished).\n\nFor the study of test particles in a rotating field, some authors have solved\nthe equations of motion for spinless and spinning test particles in the\nparticular case of circular orbits in the equatorial plane of a Kerr metric\n\\cite{tanaka 1996}, \\cite{bardeen}, \\cite{suzuki}, \\cite{mash}, \\cite{dadhich\n, \\cite{bini 2005}, \\cite{tod}, \\cite{tartaglia}. In addition, Plyastko, R.\n\\textit{et. al. }yield the full set of Mathisson-Papapetrou-Dixon Equations\n(MPD equations) for spinning test particles in the Kerr gravitational field\n\\cite{plyatsko}. These authors integrate numerically the MPD equations for the\ncase of the Schwarzschild metric. In this paper, we use the method of MPD\nEquations given by Plyastko, R. \\textit{et. al. }for calculating the\ntrajectories of spinless and spinning test particles in equatorial planes for\ncircular orbits, i.e., constant radius in a weak Kerr metric. In the\nliterature, there are not works that study via MPD equations the trajectories\nof spining test particles in weak fields.\n\nWith the purpose to prove the equations of motion that we worked, we shall\nsolve numerically the set of equations of motion obtained via MPD Equations in\nthe case when the spinless test particle is in the equatorial plane and will\ncompare the results with works that involve astronomy, especially the study of\nsatellites which orbit around the Earth. We take the same initial conditions\nin the two cases for describing the trajectory both a spinless particle and a\nspinning particle in a weak Kerr metric. Then, we compare the cartesian\ncoordinates ($x,y,z$) for the trajectory of two particles that travel in the\nsame orbit but in opposite directions. We shall take both for a spinless test\nparticle and for a spinning test particle orbiting in a weak Kerr field.\n\nThis work is organized as follows. In Section 2 we give a brief introduction\nto the MPD\\ Equations that work the set of equations of motion for test\nparticles both spinless and spinning in a rotating gravitational field. From\nthe MPD equations of motion, we yield the equations of motion for spinless and\nspinning test particles and will study the spinless test particles. Also, we\nwill give the set of MPD equations given by Plyatsko \\textit{et al.\n}\\cite{plyatsko} in a schematic form for working the case of a weak Kerr\nmetric. In Section 3, we present the Gravitomagnetic Clock Effect in order to\nprove our set of equations for spinless and spinning test particles. Then, in\nSection 4, we make a numerical comparison for spinless and spinning test\nparticle via MPD equations in the equatorial plane. We take the initial values\nfrom a satellite that is orbiting around on the Earth; then, we substitute\nthese values in the MPD equations both for spinless particles and for spinning\nparticles, and finally we make a numerical comparison of the trajectory in\ncartesian coordinates for two particles that travel in the same orbit, but in\nopposite directions. In the last section, the conclusions and some future\nworks are formulated in order to describe spinning test particles in a weak\nKerr metric.\n\n\\section{Brief introduction to the Mathisson-Papapetrou-Dixon Equations}\n\nIn general the MPD equations \\cite{mathisson}, \\cite{papapetrou}, \\cite{dixon}\nare given by the dynamics of extended bodies in the general theory of\nrelativity which includes any gravitational background. For the solution of\nour problem, we take the case of a distribution of mass ($m$) with a spin\ntensor ($S^{\\rho\\sigma}$) around a rotating central source ($M$) which has a\nmetric tensor $g_{\\mu\\nu}$. These equations of motion for a spinning test\nparticle are obtained in terms of an expansion that depends on the derivatives\nof the metric and the multipole moments of the energy-momentum tensor\n($T^{\\mu\\nu}$) \\cite{dixon} which describe the motion of an extended body. In\nthis work, we shall take a body sufficiently small so that all higher\nmultipoles can be neglected. According to this restriction the MPD equations\nare given b\n\\begin{equation}\n\\frac{D}{ds}\\left( mu^{\\lambda}+u_{\\lambda}\\frac{DS^{\\lambda\\mu}}{ds}\\right)\n=-\\frac{1}{2}u^{\\pi}S^{\\rho\\sigma}R_{\\pi\\rho\\sigma}^{\\lambda},\\label{mov1\n\\end{equation}\n\n\\begin{equation}\n\\frac{D}{ds}S^{\\mu\\nu}+u^{\\mu}u_{\\sigma}\\frac{DS^{\\nu\\sigma}}{ds}-u^{\\nu\n}u_{\\sigma}\\frac{DS^{\\mu\\sigma}}{ds}=0,\\label{mov2\n\\end{equation}\nwhere $D\/ds$ means the covariant derivative, and the antisymmetric tensor\n$S^{\\mu\\nu}$ are the linear and spin angular momenta, respectively.\n$R^{\\lambda}{}_{\\pi\\rho\\sigma}$ is the curvature tensor, and $u^{\\mu}=dz^{\\mu\n}\/ds$. But we do not have the evolution equation for $u^{\\mu}$ and it is\nneccesary to single out the center of mass which determines the world line as\na representing path and specifies a point about which the momentum and spin of\nthe particle are calculated. This world line can be determined from physical\nconsiderations \\cite{karpov}. In general, two conditions are usually imposed.\nThe Mathisson-Pirani supplementary condition is \\cite{mathisson} \\cite{pirani\n\\begin{equation}\nu_{\\sigma}S^{\\mu\\sigma}=0\\label{mp\n\\end{equation}\nand the Tulczyjew-Dixon condition \\cite{dixon\n\n\\begin{equation}\np_{\\sigma}S^{\\mu\\sigma}=0\\label{cond1\n\\end{equation}\nwher\n\\begin{equation}\np^{\\sigma}=mu^{\\sigma}+u_{\\lambda}\\frac{DS^{\\sigma\\lambda}}{ds\n\\end{equation}\nis the four momentum.\n\nFor to obtain the set of MPD equations, we take the MP condition (\\ref{mp})\nwhich has three independent relationships between $S^{\\mu\\sigma}$ and\n$u_{\\sigma}$. By this condition $S^{i4}$ is given b\n\\begin{equation}\nS^{i4}=\\frac{u_{k}}{u_{4}}S^{ki\n\\end{equation}\nwith this expression we can deal the independent components $S^{ik}$.\nSometimes it is more convenient the vector spin which is given by\n$\\ S_{i}=\\frac{1}{2u_{4}}\\sqrt{-g}\\epsilon_{ikl}S^{kl}$, where $\\epsilon\n_{ikl}$ is the spatial L\\'{e}vi-Civit\\`{a} symbol.\n\nOn the other hand, when the space-time admits a Killing vector $\\xi^{\\upsilon\n}$, there exists a property that includes the covariant derivative and the\nspin tensor, which gives a constant and is given by the expression \\cite{dixon\n1979\n\\begin{equation}\np^{\\nu}\\xi_{\\nu}+\\frac{1}{2}\\xi_{\\nu,\\mu}S^{\\nu\\mu}=\\text{ constant,\n\\label{16\n\\end{equation}\nwhere $p^{\\nu}$ is the linear momentum, $\\xi_{\\nu,\\mu}$ is the covariant\nderivative of the Killing vector, and $S^{\\nu\\mu}$ is the spin tensor of the\nparticle. In the case of the Kerr metric, there are two Killing vectors, owing\nto its stationary and axisymmetric nature. In consequence, Eq. (\\ref{16})\nyields two constants of motion: $E$ is the total energy and $L$ is the\ncomponent of its angular momentum along the axis of symmetry \\cite{iorio}.\n\n\\subsection{MPD Equations for a spinning test particle in a metric of rotating\nbody}\n\nGiven that the spinning body test is sufficiently small in regard to the\ncharacteristic length the equations of motion (Eqs. \\ref{mov1} and \\ref{mov2})\nare reduced to the case when the test particles are orbiting a metric of\nrotating body. Then, we will give the equations of motion for the case of a\nspinning test particle for a weak Kerr metric (Appendix A).\n\nFirst of all, we take the paper by R.M. Plyatsko \\textit{et al. \n\\cite{plyatsko} for obtaining the full set of the exact MPD equations for the\nmotion of a spinning test particle in the Kerr field if the MP condition\n(\\ref{mp}) is taken into account and obtain a general scheme for the set of\nequations of motion for a spinning test particle in a rotating field. Plyatsko\n\\textit{et al. }use the dimensionless quantities \\textit{y}$_{i}$ with\nparticl\n\\'{\ns coordinates b\n\\begin{equation}\ny_{1}=\\frac{r}{M}\\text{, \\ \\ \\ \\ \\ \\ }y_{2}=\\theta\\text{, \\ \\ \\ \\ \ny_{3}=\\varphi\\text{, \\ \\ \\ \\ \\ }y_{4}=\\frac{t}{M}\\label{y1\n\\end{equation}\nfor its 4-velocit\n\\begin{equation}\ny_{5}=u^{1}\\text{, \\ \\ \\ \\ \\ }y_{6}=Mu^{2}\\text{, \\ \\ \\ }y_{7}=Mu^{3}\\text{,\n\\ \\ \\ }y_{8}=u^{4}\\label{y5\n\\end{equation}\nand the spin components \\cite{plyatsko 2010\n\\begin{equation}\ny_{9}=\\frac{S_{1}}{mM}\\text{, \\ \\ \\ \\ \\ \\ \\ }y_{10}=\\frac{S_{2}}{mM^{2\n}\\text{, \\ \\ \\ \\ \\ }y_{11}=\\frac{S_{3}}{mM^{2}}\\label{y9\n\\end{equation}\n\n\nIn addition, they introduce another dimensionless quantities with regard to\nthe proper time $s$ and the constant of motion $E$, $J_{z}\n\\begin{equation}\nx=\\frac{s}{M}\\text{, \\ \\ \\ \\ \\ }\\widehat{E}=\\frac{E}{m}\\text{, \\ \\ \\ \n\\widehat{J}=\\frac{J_{z}}{mM\n\\end{equation}\n\n\nThe set of the MPD equations for a spinning particle in the Kerr field is\ngiven by eleven equations. The first four equations ar\n\\begin{equation}\n\\overset{\\bullet}{y}_{1}=y_{5}\\text{, \\ \\ \\ \\ \\ }\\overset{\\bullet}{y\n_{2}=y_{6}\\text{, \\ \\ \\ \\ \\ }\\overset{\\bullet}{y}_{3}=y_{7}\\text{,\n\\ \\ \\ \\ }\\overset{\\bullet}{y}_{4}=y_{8\n\\end{equation}\nwhere a dot denotes the usual derivative with respect to $x$.\n\nThe fifth equation is given by the first three equations of (\\ref{mov1}) with\nthe indexes $\\lambda=1,2,3$. The result is multiplied by $S_{1,}S_{2},S_{3}$\nand with the MP condition (\\ref{mp}) we have the relationship: $S^{i4\n=\\frac{u_{k}}{u_{4}}S^{ki}$ and $S_{i}=\\frac{1}{2u_{4}}\\sqrt{-g\n\\varepsilon_{ikl}S^{kl}$, we obtai\n\\begin{equation}\nmS_{i}\\frac{Du^{i}}{ds}=-\\frac{1}{2}u^{\\pi}S^{\\rho\\sigma}S_{j}R_{\\pi\\rho\n\\sigma}^{j\n\\end{equation}\nwhich can be written a\n\\begin{equation}\ny_{9}\\overset{\\bullet}{y}_{5}+y_{10}\\overset{\\bullet}{y}_{6}+y_{11\n\\overset{\\bullet}{y}_{7}=A-y_{9}Q_{1}-y_{10}Q_{2}-y_{11}Q_{3\n\\end{equation}\nwher\n\\begin{equation}\nQ_{i}=\\Gamma_{\\mu\\nu}^{i}u^{\\mu}u^{\\nu}\\text{, \\ \\ \\ \\ }A=\\frac{u^{\\pi}\n{\\sqrt{-g}}u_{4}\\epsilon^{i\\rho\\sigma}S_{i}S_{j}R_{\\pi\\rho\\sigma}^{j\n\\end{equation}\n\n\nThe sixth equation is given by\n\\begin{equation}\nu_{\\nu}\\frac{Du^{\\nu}}{ds}=0\n\\end{equation}\nwhich can be written a\n\\begin{equation}\np_{1}\\overset{\\bullet}{y}_{5}+p_{2}\\overset{\\bullet}{y}_{6}+p_{3\n\\overset{\\bullet}{y}_{7}+p_{4}\\overset{\\bullet}{y}_{8}=-p_{1}Q_{1}-p_{2\nQ_{2}-p_{3}Q_{3}-p_{4}Q_{4\n\\end{equation}\nwher\n\\begin{equation}\np_{\\alpha}=u_{\\alpha}=g_{\\mu\\alpha}u^{\\alpha\n\\end{equation}\n\n\nThe seventh equation is given b\n\\begin{equation}\nE=P_{4}-\\frac{1}{2}g_{4\\mu,\\nu}S^{\\mu\\nu\n\\end{equation}\nwhich can be written a\n\\begin{equation}\nc_{1}\\overset{\\bullet}{y}_{5}+c_{2}\\overset{\\bullet}{y}_{6}+c_{3\n\\overset{\\bullet}{y}_{7}=C-c_{1}Q_{1}-c_{2}Q_{2}-c_{3}Q_{3}+\\text{\\ \n\\widehat{E\n\\end{equation}\nwher\n\\[\nd=\\frac{1}{\\sqrt{-g}\n\\]\n\n\\begin{align}\nc_{1} & =-dg_{11}g_{22}g_{44}u^{2}S_{3}-d\\left( g_{34}^{2}-g_{33\ng_{44}\\right) g_{11}u^{3}S_{2}\\nonumber\\\\\nc_{2} & =dg_{11}g_{22}g_{44}u^{1}S_{3}+d\\left( g_{34}^{2}-g_{33\ng_{44}\\right) g_{22}u^{3}S_{1}\\nonumber\\\\\nc_{3} & =d\\left( g_{34}^{2}-g_{33}g_{44}\\right) g_{11}u^{1}S_{2}-d\\left(\ng_{34}^{2}-g_{33}g_{44}\\right) g_{22}u^{2}S_{1\n\\end{align}\n\n\\begin{equation}\nC=g_{44}u^{4}-dg_{44}u^{4}g_{43,2}S_{1}+d\\left( g_{44}u^{4}g_{43,1\n-g_{33}u^{3}g_{44,1}\\right) S_{2}+dg_{22}u^{2}g_{44,1}S_{3\n\\end{equation}\n\n\nThe eighth equation is given b\n\\begin{equation}\nJ_{z}=-P_{3}+\\frac{1}{2}g_{3\\mu,\\nu}S^{\\mu\\nu\n\\end{equation}\nwhich can be written a\n\\begin{equation}\nd_{1}\\overset{\\bullet}{y}_{5}+d_{2}\\overset{\\bullet}{y}_{6}+d_{3\n\\overset{\\bullet}{y}_{8}=D-d_{1}Q_{1}-d_{2}Q_{2}-d_{3}Q_{4}-\\widehat{J\n\\end{equation}\nwher\n\\begin{align}\nd_{1} & =-dg_{11}g_{22}g_{34}u^{2}S_{3}+dg_{11}g_{33}g_{34}u^{3\nS_{2}+dg_{11}g_{34}^{2}u^{4}S_{2}-dg_{11}g_{33}g_{44}u^{4}S_{2}\\nonumber\\\\\nd_{2} & =-dg_{11}g_{22}g_{34}u^{1}S_{3}-dg_{22}g_{33}g_{34}u^{3\nS_{1}-dg_{22}g_{34}^{2}u^{4}S_{1}+dg_{22}g_{33}g_{44}u^{4}S_{1}\\nonumber\\\\\nd_{3} & =-dg_{11}g_{34}^{2}u^{1}S_{2}+dg_{22}g_{34}^{2}u^{2}S_{1\n+dg_{22}g_{33}g_{44}u^{2}S_{1}-dg_{11}g_{33}g_{34}u^{1}S_{2\n\\end{align}\n\n\\begin{align}\nD & =g_{33}u^{3}-dg_{22}u^{2}g_{34,2}S_{1}+d\\left( g_{44}u^{4\ng_{33,1}+g_{11}u^{1}g_{34,1}-g_{33}u^{3}g_{34,1}\\right) S_{2}\\nonumber\\\\\n& -dg_{11}u^{1}g_{34,1}S_{3\n\\end{align}\n\n\nFinally, the last three equations are given b\n\\begin{equation}\nu^{4}\\overset{\\bullet}{S}_{i}+2\\left( \\overset{\\bullet}{u}_{[4}u_{i]}-u^{\\pi\n}u_{\\rho}\\Gamma_{\\pi\\lbrack4}^{\\rho}u_{i]}\\right) S_{k}u^{k}+2S_{n\n\\Gamma_{\\pi\\lbrack4}^{n}u_{i]}u^{\\pi}=0\n\\end{equation}\nwhich give the derivatives of three components of vector spin\n($\\overset{\\bullet}{S}_{i}$): $\\overset{\\bullet}{y}_{9}$, $\\overset{\\bullet\n}{y}_{10}$ and $\\overset{\\bullet}{y}_{11}$.\n\nAfter achieving the system of equations of motion for spinning test particles,\nwe numerically solve it. We used the fourth-order Runge Kutta method. First we\ntake the case when a test particle is orbiting far away from the central\nsource and is in the equatorial plane. For our numerical calculations, we take\nthe parameters both of the central source and the test particle such as the\nradio, the energy, the angular momentum and the components tangential and\nradial of the four-velocity ($u^{\\mu}$). We calculate the orbit of a test\nparticle both spinless and spinning a weak Kerr metric in cartesian\ncoordinates ($x$, $y$, \\thinspace$z$). Then, we make a comparison of the time\nthat a test particle takes to do a lap in the two cases and give some conclusions.\n\n\\subsection{Equations of motion for a spinning test particle in a weak Kerr\nmetric}\n\nIn the last section, we obtained the general scheme for the set of equations\nof motion of a spinning test particle in the gravitational field of a rotating\nbody. Now, we yield the set of equations for the case of a spinning test\nparticle in the equatorial plane of a weak metric Kerr (Appendix A). This set\nof equations is given b\n\n\\begin{equation}\nr^{\\prime}[s]=\\frac{dr}{ds}\\text{; \\ \\ \\ }\\theta^{\\prime}[s]=\\frac{d\\theta\n}{ds}=0\\text{; \\ \\ \\ }\\varphi^{\\prime}[s]=\\frac{d\\varphi}{ds}\\text{;\n\\ \\ \\ \\ }\n\\acute{\n[s]=\\frac{dt}{ds\n\\end{equation}\n\n\\begin{align}\n\\frac{d^{2}r}{ds^{2}} & =\\left( \\frac{c_{3}d_{3}}{R_{1}}\\right) \\left(\n\\frac{R_{2}}{c_{3}}+\\frac{R_{3}}{d_{3}}+R_{4}\\right) \\\\\n\\frac{d^{2}\\varphi}{ds^{2}} & =\\left( \\frac{-c_{1}d_{3}}{R_{1}}\\right)\n\\left( \\frac{R_{2}}{c_{3}}+\\frac{R_{3}}{d_{3}}+R_{4}\\right) +\\frac{\\left(\nB-c_{1}Q_{1}+\\overset{\\wedge}{E}\\right) }{c_{3}}-Q_{3}\\\\\n\\frac{d^{2}t}{ds^{2}} & =\\left( \\frac{-d_{1}c_{3}}{R_{1}}\\right) \\left(\n\\frac{R_{2}}{c_{3}}+\\frac{R_{3}}{d_{3}}+R_{4}\\right) +\\frac{\\left(\nF-d_{1}Q_{1}-\\overset{\\wedge}{J}\\right) }{d_{3}\n\\end{align}\n\n\\[\nz:=\\left( r[s]\\right) ^{2}\\text{; \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ }q:=r[s]\\left(\nr[s]-2\\right) \\text{; \\ \\ \\ }\\psi:=\\left( r[s]\\right) ^{2\n\\]\n\n\\[\n\\eta:=3\\left( r[s]\\right) ^{2}\\text{; \\ \\ \\ \\ }\\chi:=\\left( r[s]\\right)\n^{2}\\text{; \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ }\\xi:=\\left( r[s]\\right) ^{2\n\\]\n\n\\[\np:=2\\alpha\\left( \\sin\\left( \\frac{\\pi}{2}\\right) \\right) ^{2\nr[s]\\frac{d\\varphi}{ds}+\\left( \\left( r[s]\\right) ^{2}-2r[s]\\right)\n\\frac{dt}{ds}\\text{; \n\\]\n\n\\[\n\\text{\\ }p_{1}:=-\\left( 1-\\frac{2}{r[s]}\\right) ^{-1}\\frac{dr}{ds}\\text{;\n\\ \\ }p_{2}:=0;\n\\]\n\n\\[\n\\text{\\ }p_{3}:=\\frac{2\\alpha\\left( \\sin\\left( \\frac{\\pi}{2}\\right)\n\\right) ^{2}r[s]\\frac{dt}{ds}-\\left( \\sin\\left( \\frac{\\pi}{2}\\right)\n\\right) ^{2}\\left( r[s]\\right) ^{4}\\frac{d\\varphi}{ds}}{\\left(\nr[s]\\right) ^{2}}\\text{;\n\\]\n\n\\[\np_{4}:=\\frac{2\\alpha\\left( \\sin\\left( \\frac{\\pi}{2}\\right) \\right)\n^{2}r[s]\\frac{d\\varphi}{ds}+\\left( \\left( r[s]\\right) ^{2}-2r[s]\\right)\n\\frac{dt}{ds}}{\\left( r[s]\\right) ^{2}\n\\]\n\n\\[\nc_{1}:=S_{2}\\sin\\left( \\frac{\\pi}{2}\\right) \\frac{d\\varphi}{ds}\\text{;\n\\ \\ \\ \\ \\ }c_{2}:=0\\text{; \\ \\ \\ \\ \\ }c_{3}:=-S_{2}\\sin\\left( \\frac{\\pi\n{2}\\right) \\frac{dr}{ds\n\\]\n\n\\[\nd_{1}:=-S_{2}\\sin\\left( \\frac{\\pi}{2}\\right) \\frac{dt}{ds}\\text{;\n\\ \\ \\ \\ }d_{2}:=0\\text{; \\ \\ \\ \\ }d_{3}:=S_{2}\\sin\\left( \\frac{\\pi\n{2}\\right) \\frac{dr}{ds\n\\]\n\n\\begin{align*}\nQ_{1} & :=\\frac{\\left( \\left( r[s]-2\\right) -r[s]+2\\right) }{\\left(\nr[s]\\right) \\left( r[s]-2\\right) +\\alpha^{2}}\\left( \\frac{dr}{ds}\\right)\n^{2}-\\left( \\sin\\left( \\frac{\\pi}{2}\\right) \\right) ^{2}\\left(\nr[s]-2\\right) \\left( \\frac{d\\varphi}{ds}\\right) ^{2}\\\\\n& +\\frac{\\left( r[s]-2\\right) }{\\left( r[s]\\right) ^{3}}\\left( \\frac\n{dt}{ds}\\right) ^{2}-\\frac{2\\alpha\\left( \\sin\\left( \\frac{\\pi}{2}\\right)\n\\right) ^{2}\\left( r[s]-2\\right) }{\\left( r[s]\\right) ^{3}}\\frac\n{d\\varphi}{ds}\\frac{dt}{ds\n\\end{align*}\n\n\\begin{align*}\nQ_{2} & :=0\\\\\nQ_{3} & :=\\frac{2}{\\left( r[s]\\right) }\\frac{dr}{ds}\\frac{d\\varphi\n{ds}+\\frac{2\\alpha}{\\left( r[s]\\right) ^{3}\\left( r[s]-2\\right) }\\frac\n{dr}{ds}\\frac{dt}{ds}\\\\\nQ_{4} & :=-\\frac{6\\alpha}{\\left( r[s]\\right) \\left( r[s]-2\\right) \n\\frac{dr}{ds}\\frac{d\\varphi}{ds}+\\frac{2}{\\left( r[s]\\right) \\left(\nr[s]-2\\right) }\\frac{dr}{ds}\\frac{dt}{ds\n\\end{align*}\n\n\\[\nB:=-\\left( 1-\\frac{2}{\\left( r[s]\\right) }\\right) \\frac{dt}{ds\n-\\frac{2\\alpha\\left( \\sin\\left( \\frac{\\pi}{2}\\right) \\right) ^{2}}{\\left(\nr[s]\\right) ^{2}}\\frac{dr}{ds}\\frac{d\\varphi}{ds}+\\frac{S_{2}\\sin\\left(\n\\frac{\\pi}{2}\\right) }{\\left( r[s]\\right) ^{2}}\\frac{d\\varphi}{ds\n-\\frac{\\alpha S_{2}\\sin\\left( \\frac{\\pi}{2}\\right) }{\\left( r[s]\\right)\n^{4}}\\frac{dt}{ds\n\\]\n\n\\begin{align*}\nF & :=-\\frac{3\\alpha S_{2}\\left( \\sin\\left( \\frac{\\pi}{2}\\right) \\right)\n^{3}}{\\left( r[s]\\right) ^{2}}\\frac{d\\varphi}{ds}-\\frac{S_{2}\\left( \\left(\nr[s]\\right) -2\\right) }{\\left( r[s]\\right) ^{2}}\\frac{dt}{ds}\\\\\n& +\\frac{\\left(\n\\begin{array}\n[c]{c\n2\\alpha\\left( \\sin\\left( \\frac{\\pi}{2}\\right) \\right) ^{2}\\left(\nr[s]\\right) ^{2}\\frac{dr}{ds}\\left( \\frac{d\\varphi}{ds}\\right) ^{2}\\\\\n+\\left( r[s]\\right) ^{3}\\left( r[s]-2\\right) \\frac{dr}{ds}\\frac{dt\n{ds}-2\\alpha\\left( \\left( r[s]\\right) -2\\right) \\left( \\frac{dt\n{ds}\\right) ^{2\n\\end{array}\n\\right) \\left( \\sin\\left( \\frac{\\pi}{2}\\right) \\right) ^{2}\n{2\\alpha\\left( \\sin\\left( \\frac{\\pi}{2}\\right) \\right) ^{2}r[s]\\frac\n{d\\varphi}{ds}+\\left( \\left( r[s]\\right) ^{2}-2r[s]\\right) \\frac{dt}{ds}\n\\end{align*}\n\n\\begin{align*}\nR_{1} & :=c_{3}d_{3}p_{1}-d_{3}p_{3}c_{1}-p_{4}d_{1}c_{3}\\\\\nR_{2} & :=p_{3}\\left( c_{1}Q_{1}-B-\\overset{\\wedge}{E}\\right) \\\\\nR_{3} & :=p_{4}\\left( d_{1}Q_{1}-F+\\overset{\\wedge}{J}\\right) \\\\\nR_{4} & :=-p_{1}Q_{1\n\\end{align*}\n\n\n\\subsection{MPD Equations for spinless test particle in a weak Kerr metric}\n\nThe traditional form of MP equations is \\cite{mathisson\n\\begin{equation}\n\\frac{D}{ds}\\left( mu^{\\lambda}+u_{\\lambda}\\frac{DS^{\\lambda\\mu}}{ds}\\right)\n=-\\frac{1}{2}u^{\\pi}S^{\\rho\\sigma}R_{\\pi\\rho\\sigma}^{\\lambda}\\label{mp1\n\\end{equation}\n\n\nFirst of all, we consider the case of the motion of a spinning test particle\nin equatorial circular orbits ($\\theta=\\pi\/2$) from the weak Kerr source, that\nis, $a\/r\\ll1$ and $MG\/c^{2}$. For this case we take \\cite{plyatsko 2013\n\\begin{equation}\nu^{1}=0\\text{, \\ }u^{2}=0\\text{, \\ }u^{3}=\\text{const, \\ }u^{4}=\\text{ const\n\\end{equation}\nwhen the spin is perpendicular to this plane and the MP condition (\\ref{mp}),\nwit\n\\begin{equation}\nS_{1}\\equiv S_{r}=0\\text{, \\ }S_{2}\\equiv S_{\\theta}\\neq0\\text{, \\ \nS_{3}\\equiv S_{\\varphi}=0.\n\\end{equation}\n\n\nThe equation is given b\n\\[\n-y_{1}^{3}\\ast y_{7}^{2}-2\\alpha\\ast y_{7}y_{8}+y_{8}^{2}-3\\ast\\alpha\n\\ast\\varepsilon_{0}y_{7}^{2}+3\\varepsilon_{0}y_{7}y_{8}-3\\alpha\\varepsilon\n_{0}y_{8}^{2}y_{1}^{-2}+3\\alpha\\varepsilon_{0}y_{1}^{2}y_{7}^{4\n\\\n\\[\n-\\alpha\\varepsilon_{0}\\left( 1-\\frac{2}{y_{1}}\\right) y_{8}^{4}y_{1\n^{-3}+\\varepsilon_{0}\\left( y_{1}^{6}-3y_{1}^{5}\\right) y_{7}^{3}y_{8\ny_{1}^{-3}+\\alpha\\varepsilon_{0}\\left( 3y_{1}^{3}-11y_{1}^{2}\\right)\ny_{7}^{2}y_{8}^{2}y_{1}^{-3\n\\\n\\begin{equation}\n+\\varepsilon_{0}\\left( -y_{1}^{3}+3y_{1}^{2}\\right) y_{7}y_{8}^{3}y_{1\n^{-3}=0\\label{c\n\\end{equation}\n\n\nThen, for the case when the particle does not have spin the set of equations\n(\\ref{c}) with the dimensionless quantities \\textit{y}$_{i}$ (\\ref{y1}) and\n(\\ref{y5}) is reduced t\n\\begin{equation}\n-y_{1}^{3}\\ast y_{7}^{2}-2\\alpha\\ast y_{7}y_{8}+y_{8}^{2}=0\\label{a\n\\end{equation}\nwhere $\\alpha=a\/M$.\n\nIn addition to Eq. (\\ref{a}), we take the condition $u_{\\mu}u^{\\mu}=1$ and\nobtai\n\\begin{equation}\n-y_{1}^{2}\\ast y_{7}^{2}+4\\alpha\\frac{y_{7}y_{8}}{y_{1}}+\\left( 1-\\frac\n{2M}{y_{1}}\\right) y_{8}^{2}=1\\label{b\n\\end{equation}\n\n\nWe solve the system of equations (\\ref{a}) and (\\ref{b}) for the case of a\ncircular orbit and obtain the values of \\ $y_{7}=Mu^{3}$ and\\ $y_{8}=u^{4}$.\n\n\\subsection{Constants of motion for a weak Kerr metric}\n\nWith the Tulczyjew-Dixon condition (\\ref{cond1}), we determine the center of\nmass of the particle and let $u^{\\mu}$ be its four-velocity; also, the MPD\nequations (\\ref{mov1}) and (\\ref{mov2}) yield a unique $u^{\\mu}$, namely\n\\cite{kyrian\n\n\\begin{equation}\nu^{\\mu}=V^{\\mu}+\\frac{1}{2}\\left( \\frac{S^{\\mu\\nu}R_{\\nu\\rho\\sigma\\kappa\n}V^{\\rho}S^{\\sigma\\kappa}}{m^{2}+\\frac{1}{4}R_{\\chi\\xi\\zeta\\eta}S^{\\chi\\xi\n}S^{\\zeta\\eta}}\\right) .\\label{condition\n\\end{equation}\n$u^{\\mu}$ and $V^{\\mu}$ are named by Dixon as kinematical four velocity and\ndynamical four velocity, respectively \\cite{dixon 1979}.\n\nSince $p_{\\mu}p^{\\mu}=$ constant and $S_{\\rho\\sigma}S^{\\rho\\sigma}=$ constant\nalong the particle trajectory \\cite{wald}, we may se\n\n\\begin{equation}\nu_{\\mu}u^{\\mu}=-1\\text{, \\ \\ \\ \\ \\ \\ }S_{0}^{2}=S_{\\mu}S^{\\mu}=\\frac{1\n{2m^{2}}S_{\\mu\\nu}S^{\\mu\\nu}\\text{,}\\label{7a\n\\end{equation}\nand with these expressions, we obtain the center of mass condition and the\nrelation between the spin tensor and the vector spin.\n\nNext, we reduced the set of MPD equations given by Plyatsko \\textit{et al.\n}\\cite{plyatsko} for the case when a spinning test particle is a weak Kerr\nmetric in the equatorial plane and follows a circular orbit. Then, for the\ninitial conditions we need the values of both the energy ($E$) and the\ncomponent $z$ of the angular momentum ($J$) for a weak Kerr metric. In this\ncase, the constants of motion are given b\n\n\\begin{align}\nE & =m\\left( g_{44}+g_{34}\\right) V^{4}+\\frac{Ma}{r^{2}}S^{13}-\\frac\n{M}{r^{2}}\\frac{g_{33}V^{3}}{g_{44}V^{4}}S^{13}\\label{E}\\\\\nJ_{z} & =-m\\left( g_{33}+g_{34}\\right) V^{3}+r\\sin^{2}\\theta S^{13\n-\\frac{Ma}{r^{2}}\\frac{\\left( g_{33}+g_{34}\\right) V^{3}}{\\left(\ng_{44}+g_{34}\\right) V^{4}}S^{13}\\label{J\n\\end{align}\nwhere $V^{3}$ and $V^{4}$ are components of the dynamical 4-velocity and\n$S^{13}$ is the perpendicular component of the spin vector.\n\nWe yield the components of the 4-velocity $u^{\\lambda}$ (\\ref{condition}) for\nthe case of a spinning test particle in a weak Kerr metric and in the\nequatorial plane $\\theta=\\pi\/2$ when spin is orthogonal to this plane and has\na constant radius ($x^{1}=r=$ constant). We use the Boyer-Lindquist\ncoordinates ($x^{1}=r,$ $x^{2}=\\theta$, $x^{3}=\\varphi$, $x^{4}=t$). We hav\n\\begin{align}\nu^{1} & =0\\text{, \\ \\ \\ \\ \\ }u^{2}=0\\text{, \\ \\ \\ \\ \\ }u^{3}\\neq0\\text{,\n\\ \\ \\ \\ \\ }u^{4}\\neq0\\text{,}\\label{29}\\\\\nS^{12} & =0\\text{, \\ \\ \\ \\ \\ }S^{23}=0\\text{, \\ \\ \\ \\ \\ }S^{13\n\\neq0\\label{30\n\\end{align}\n\n\nIn addition to (\\ref{30}) by Tulczyjew-Dixon condition (\\ref{cond1}) we writ\n\\begin{equation}\nS^{14}=-\\frac{P_{3}}{P_{4}}S^{13}\\text{, \\ \\ \\ \\ \\ }S^{24}=0\\text{,\n\\ \\ \\ \\ \\ }S^{34}=\\frac{P_{1}}{P_{4}}S^{13}\\label{31\n\\end{equation}\n\n\nUsing (\\ref{7a}), (\\ref{29})-(\\ref{31}) and taking the components of the\nRiemann tensor for the weak Kerr metric in the equatorial plane, from\n(\\ref{condition}) we obtai\n\\begin{align}\nu^{1} & =NV^{1}\\left( 1+\\frac{3M}{r^{3}}V_{3}V^{3}\\frac{S_{0}^{2}\n{m^{2}\\Delta}+a\\frac{S_{0}^{2}}{m^{2}\\Delta}k_{1}\\frac{V_{3}}{V_{4}}\\right)\n\\nonumber\\\\\nu^{2} & =V^{2}=0\\nonumber\\\\\nu^{3} & =NV^{3}\\left( 1+\\frac{3M}{r^{3}}\\left( V_{3}V^{3}-1\\right)\n\\frac{S_{0}^{2}M}{m^{2}\\Delta}+a\\frac{S_{0}^{2}M}{m^{2}\\Delta}k_{3}\\frac\n{V^{3}}{V^{4}}\\right) \\nonumber\\\\\nu^{4} & =NV^{4}\\left( 1+\\frac{3M}{r^{3}}V_{3}V^{3}\\frac{S_{0}^{2}\n{m^{2}\\Delta}+a\\frac{S_{0}^{2}M}{m^{2}\\Delta}k_{4}\\left( \\frac{V^{3}}{V^{4\n}\\right) ^{2}\\right) \\label{32\n\\end{align}\nwhere the constants $k_{1}$, $k_{3}$ and $k_{4}$ are given b\n\\begin{align*}\nk_{1} & =\\frac{3M\\left( 1-\\frac{4M}{3r}\\right) }{g_{11}g_{44}}\\\\\nk_{3} & =k_{1}\\\\\nk_{4} & =\\frac{k_{1}}{rg_{44}\n\\end{align*}\nand the expression $\\Delta=1+\\frac{1}{4m^{2}}R_{\\chi\\xi\\zeta\\eta}S^{\\chi\\xi\n}S^{\\zeta\\eta}$\\ for the weak Kerr metric is given b\n\\begin{equation}\n\\Delta=1+\\frac{S_{0}^{2}M}{m^{2}r^{3}}\\left( 1-3V_{3}V_{3}-aA\\frac{V^{3\n}{V^{4}}\\right) \\label{33\n\\end{equation}\nwhere $a=J\/Mc$ is the angular density of the central mass and\n\\[\nA=\\frac{3M\\left( 1-\\frac{4M}{3r}\\right) g_{33}}{g_{44}\n\\]\n\n\nWe insert (\\ref{33}) into (\\ref{32}), we ge\n\\begin{align}\nu^{1} & =\\frac{NV^{1}}{\\Delta}\\left( 1+\\frac{S_{0}^{2}M}{m^{2}r^{3}\n-a\\frac{S_{0}^{2}}{m^{2}}\\left( MA-k_{1}\\right) \\frac{V^{3}}{V^{4}}\\right)\n\\nonumber\\\\\nu^{3} & =\\frac{NV^{3}}{\\Delta}\\left( 1-\\frac{2S_{0}^{2}M}{m^{2}r^{3\n}-a\\frac{S_{0}^{2}}{m^{2}}\\left( MA-k_{3}\\right) \\frac{V^{3}}{V^{4}}\\right)\n\\nonumber\\\\\nu^{4} & =\\frac{NV^{4}}{\\Delta}\\left( 1+\\frac{2S_{0}^{2}M}{m^{2}r^{3\n}-a\\frac{S_{0}^{2}}{m^{2}}\\left( MA-k_{4}\\left( \\frac{V^{3}}{V^{4}}\\right)\n^{2}\\right) \\frac{V^{3}}{V^{4}}\\right) \\label{34\n\\end{align}\n\n\nWe introduc\n\\begin{equation}\n\\varepsilon=\\frac{\\left\\vert S_{0}\\right\\vert }{mr\n\\end{equation}\nand obtain the expression for $N$ from the condition\n\\begin{align*}\nV_{\\lambda}V^{\\lambda} & =0\\\\\nV_{\\lambda}S^{\\lambda\\nu} & =0\n\\end{align*}\n\n\n$N$ is given b\n\\begin{equation}\nN=\\frac{\\Delta}{R}\\label{36a\n\\end{equation}\nwher\n\\begin{equation}\nR=\\left( m^{2}\\Delta^{2}+S_{0}^{4}R^{\\mu\\tau\\rho\\delta}R_{\\mu\\tau\\rho\\delta\n}\\right) ^\n\\frac12\n}\\label{36\n\\end{equation}\n\n\nWe insert (\\ref{36a}) into (\\ref{34}) and obtain the components from\n$V^{\\lambda}\n\\begin{align}\nV^{1} & =\\frac{Ru^{1}}{\\left( 1+\\frac{S_{0}^{2}M}{m^{2}r^{3}}\\left(\n1+a\\left( A+k_{1}\\right) \\right) \\right) }\\nonumber\\\\\nV^{3} & =\\frac{Ru^{3}}{\\left( 1-\\frac{S_{0}^{2}M}{m^{2}r^{3}}\\left(\n1+a\\left( A-k_{3}\\right) \\right) \\right) }\\nonumber\\\\\nV^{4} & =\\frac{Ru^{4}}{\\left( 1+\\frac{S_{0}^{2}M}{m^{2}r^{3}}\\left(\n1-a\\left( A+3\\left( u^{3}\\right) ^{2}k_{4}\\right) \\right) \\right)\n}\\label{37\n\\end{align}\n\n\nWe replace the components of the dynamical 4-velocity (\\ref{37}) in the\nconstants of motion (\\ref{E}) and (\\ref{J}) for the case of a spinning test\nparticle in a weak Kerr field.\n\n\\section{Gravitomagnetic clock effect for spinning test particles}\n\nFor cheking our results, we review the papers in regarding to Gravitomagnetic\nclock effect \\cite{tsoubelis} and compare their numerical results with ours.\nThere is a phenomenon called the gravitomagnetic clock effect which consists\nof a difference in the time it takes for two test particles to travel around a\nrotating massive body in the equatorial plane and in opposite directions\n\\cite{faruque2004}. This difference is given by $t_{+}-t_{-}=4\\pi a\/c$, where\n$a=J\/Mc$ is the angular density of the central mass. Tartaglia has studied the\ngeometrical aspects of this phenomenon \\cite{tartaglia}, \\cite{tartaglia2001}\nand Faruque yields the equation of the gravitomagnetic clock effect with spin\na\n\\begin{equation}\nt_{+}-t_{-}=4\\pi a-6\\pi S_{0}\\text{,}\\label{gm1\n\\end{equation}\nwhere $S_{0}$ is the magnitude of the spin.\n\nIn true units this relation is given b\n\\begin{equation}\nt_{+}-t_{-}=\\frac{4\\pi J_{M}}{Mc^{2}}-\\frac{6\\pi J}{mc^{2}},\\label{gm\n\\end{equation}\nwhere the first relation of the right could be used to measure $J\/M$ directly\nfor an astronomical body; in the case of the Earth $t_{+}-t_{-}\\simeq10^{-7\n\\operatorname{s\n$, while for the Sun $t_{+}-t_{-}\\simeq10^{-5\n\\operatorname{s\n$ \\cite{mash 1999}.\n\n\\section{Numerical comparison for spinless and spinning test particle via MPD\nequations}\n\nIn this section we give the numerical results for the case of a spinning\nsatellite orbiting around the Earth \\cite{iorio 2001}. We took the data of the\nAriane-5 satellite which is a space European vehicle that is part of the\nAriane family \\cite{ariane}. For our calculations we assume the satellite\nfollows a circular orbit with radius equal to $3.5\\times10^{6\n\\operatorname{m\n$ and travels in the equatorial plane. Of course, the satellite has an orbit\nthat is more complex. The initial conditions are given by geometrized units,\nwhere the gravitational constant $G$, and speed of light $c$, are set equal to one.\n\nAccording with the features of the Ariane-5 satellite, its initial conditions\nar\n\\[\n\\text{Mass}(m)_{\\text{satellite}}=3\\times10^{3\n\\operatorname{kg\n\\text{, \\ \\ \\ \\ \\ \\ \\ }\\varepsilon_{0}=\\frac{S_{0}}{mr}=6.0976\\times10^{-11\n\\]\n\n\nThe fundamental frequency in the longitudinal axis equals 30 Hz and the\ncomponents of the four velocity of the satellite are given by a set of\nequations (\\ref{c}) and (\\ref{b}) for a orbit of $3.5\\times10^{6\n\\operatorname{m\n$. For this case, in ordinary units, the azimuthal component is $u^{3\n=2.42294\\times10^{3}$ \n\\operatorname{m\n\n\\operatorname{s\n$\\ .\n\nWe take the set of MPD equations for a spinning test particle in a weak Kerr\nmetric (Appendix A) and write the initial conditions for this satellite. With\nthe Runge-Kutta method of order 4 \\cite{press}, we obtain the cartesian\ncoordinates for a circular orbit when the satellite orbits in the same sense\nof rotation of the central source ($a$). The program code is in the Appendix\nB. We register the time that satellite takes for doing a lap. Then we take the\nsame data in the case when the satellite orbits with the sense of rotation\ncontrary to that of the central source ($a$). Finally, we take the difference\nof time in these two orbits and obtai\n\\begin{equation}\n\\Delta\\tau_{\\text{spinning}}=\\tau_{+}-\\tau_{-}=7.275957\\times10^{-7\n\\operatorname{s\n\\end{equation}\n\n\nNow we take the case when the test particle does not have spin and calculate\nthe cartesian coordinates ($x$, $y$, \\thinspace$z$) for a circular orbit of a\nspinless test particle around a rotating body mass both in the same sense of\nrotation of the central mass and in opposite direction. In this case, we take\nthe set of MPD equations for a spinless particle, Eqs. (\\ref{a}) - (\\ref{b}).\nThere is a spinless particle in the equatorial plane ($u^{2}=0$) and with a\nradius constant ($u^{1}=0$). We assume the same initial conditions as in the\nprevious case. As the above part, we calculate the difference of time of two\nparticles travel in the same orbit, but in opposite directions, and the result\ni\n\\begin{equation}\n\\Delta\\tau_{\\text{spinless}}=\\tau_{+}-\\tau_{-}=9.01062\\times10^{-7\n\\operatorname{s\n\\end{equation}\n\n\nThis result is according to the literature. In some papers this difference of\ntime is called Effect Gravitomagnetic and is given by the expression\n\\cite{iorio 2001\n\\begin{equation}\n\\left( \\tau_{+}-\\tau_{-}\\right) _{\\phi=2\\pi}\\simeq4\\pi\\frac{J_{\\oplus\n}{M_{\\oplus}c^{2}}\\simeq10^{-7\n\\operatorname{s\n\\end{equation}\nwhere $M_{\\oplus}$ and $J_{\\oplus}$ are the values of the mass of Earth and\nthe angular momentum respect\n\nAccording to the results, the spinless test particle in a positive sense\ncompletes a full orbit before the particle with the sense of rotation\ncontrary. This phenomenon is due to drag of the inertial frames with respect\nto infinity and is called the Lense-Thirring effect \\cite{mash 1984}. In the\ncase of the spinning test particles, not only there is a difference in the\ntime given by the Lense-Thirring effect, but also by a coupling between the\nangular momentum of the central body with the spin of the particle\n\\cite{chandra}. The features change if the test particle rotates in one\ndirection or the other; therefore, the period is different for one sense and\nfor the other, and if the particle has spin or not. The difference of time\nbetween the spinless particles and the spinning particles is so small that the\nresult is the same order of the shift ($10^{-7\n\\operatorname{s\n$). In other words, when the spinning test particle is very small compared\nwith the central mass, the influence of the value of spin in the shift of time\nis insignificant in regard to lapse of time.\n\n\\section{Conclusions}\n\nIn this paper, we take the Mathisson-Papapetrou-Dixon (MPD) equations given by\nPlyatsko \\textit{et al.} and obtained explicitly the MPD equations for the\ncase when the spinning test particle is orbiting in a rotating weak field.\nWork that was not in the literature. In addition, we gave a scheme for the\neleven equations of the full set of equations of motion when the particle is\norbiting a rotating gravitational field. In the second part, we worked the\nconstants of motion such as the energy ($E$) and the angular momentum ($J_{z\n$) of the spinning test particle in a weak Kerr metric. Finally, we calculated\nthe trajectories in cartesian coordinates ($x$, $y$, \\thinspace$z$) of test\nparticles both spinless and spinning orbiting in a weak Kerr metric and\ncompared the time of two circular orbits in the equatorial plane for two test\nparticles that travel in the same orbit but in opposite directions. In the\ncase of the Earth, both for the spinless particles and the spinning particles\nthere is a difference of time in their trajectories when they describe a full\nrevolution with respect to an asymptotically inertial observer. This\nphenomenum is called Gravitomagnetic Effect. From this situation, we concluded\nthat this shift, in the case of the spinless test particles, is given by the\nangular momentum from the central source which drags the inertial systems in\nthe same sense of the rotation of the rotating massive body. For the case of\nthe spinning test particles, this time lapse is given not only by the angular\nmomentum from the central mass, but also by the couple between the angular\nmomentum from the massive rotating body and the parallel component of the spin\nof the test particle. In the MPD equations, this couple is given by the\nrelationship between the components of the Riemman tensor ($R^{\\mu}$\n$_{\\nu\\rho\\sigma} $) and the spin tensor ($S^{\\rho\\sigma}$).\n\nIn the future we will work in the set of Equations of motion of a test\nparticle both spinless and spinning for spherical orbits, that is, with\nconstant radius and out of the equatorial plane in a weak Kerr metric. In\naddition, we are interesting in relating these equations with the experiments\ntype Michelson and Morley.\n\n\\begin{acknowledgement}\nOne of the authors is grateful with Pontificia Universidad Javeriana at\nBogot\\'{a} and with Professor Roman Plyastsko for his helpful suggestions.\n\\end{acknowledgement}\n\n\\bigskip\n\n\\begin{center}\n\\textbf{Appendix A}\n\n\\textbf{Weak Kerr Metric}\n\\end{center}\n\nThe components of a weak Kerr Metric are given b\n\n\\[\ng_{\\mu\\nu}=\\left(\n\\begin{array}\n[c]{cccc\n1-\\frac{2M}{r} & 0 & 0 & \\frac{2Ma\\sin^{2}\\theta}{r}\\\\\n0 & -1-\\frac{2M}{r} & 0 & 0\\\\\n0 & 0 & -r^{2} & 0\\\\\n\\frac{2Ma\\sin^{2}\\theta}{r} & 0 & 0 & -r^{2}\\sin^{2}\\theta\n\\end{array}\n\\right)\n\\]\n\n\n\\bigskip\n\n\\begin{center}\n\\textbf{Appendix B}\n\n\\textbf{Program code}\n\\end{center}\n\n$TF=1\\ast10^{6};\\epsilon_{0}=6.0976\\ast10^{-11};y1=3.1085\\ast10^{4\n;y10=y1\\ast\\epsilon_{0};$\n\n$y5=0;\\alpha=1.9765\\ast10^{-16};$\n\n$M=4.431948\\ast10^{-3};m=2.228\\ast10^{-24};y2=\\frac{\\pi}{2};$\n\nSetPrecision$[$NSolve[\\{$-(y1)^{3}(y_{7})^{2}-2\\ast\\alpha\\ast y_{7\ny_{8}+(y_{8})^{2}-3\\ast\\alpha\\ast\\epsilon_{0}(y1)^{2}\\ast\\frac{(y_{7})^{2\n}{(y1)^{2}}+3\\ast\\epsilon_{0}\\ast y_{7}y_{8}-3\\ast\\alpha\\ast\\epsilon_{0\n\\ast\\frac{(y_{8})^{2}}{(y1)^{2}}+$\n\n$3\\ast\\alpha\\ast\\epsilon_{0}\\ast(y1)^{2}(y_{7})^{4}-\\alpha\\ast\\epsilon_{0\n\\ast(1-\\frac{2}{y1})\\frac{(y_{8})^{4}}{(y1)^{3}}+\\epsilon_{0}((y1)^{6\n-3(y1)^{5})\\frac{(y_{7})^{3}y_{8}}{(y1)^{3}}+\\alpha\\ast\\epsilon_{0\n(3(y1)^{3}-11(y1)^{2})\\ast\\frac{(y_{7})^{2}(y_{8})^{2}}{(y1)^{3}}+$\n\n$\\epsilon_{0}\\ast(-(y1)^{3}+3(y1)^{2})\\frac{y_{7}(y_{8})^{3}}{(y1)^{3\n}==0,-(y1)^{2}(y_{7})^{2}+\\frac{4\\ast\\alpha\\ast y_{7}\\ast y_{8}}{y1}$\n\n$+\\left( 1-\\frac{2}{y1}\\right) (y_{8})^{2}==1\\},\\{y_{7},y_{8}\\}],10]$\n\nsystem1 $=\\{y_{3\n\\acute{\n[s]==y_{7},y_{4\n\\acute{\n[s]==y_{8},y_{3}[0]==0,y_{4}[0]==0\\};$\n\n$sol1=$ NDSolve$[$system1$,\\{y_{3},y_{4},y_{3\n\\acute{\n,y_{4\n\\acute{\n\\},\\{s,0,TF\\},$\n\n$Method\\rightarrow\"Automatic\",MaxSteps\\rightarrow1\\ast10^{10}]$\n\n$graph1=$ ParametricPlot3D$[$Evaluate$[\\{(y1)\\ast\\sin\\frac{\\pi}{2}\\ast\n\\cos[{{{{{y_{3}[s]}}}}}],(y1)\\ast\\sin\\frac{\\pi}{2}\\ast\\sin[{{{{{y_{3}[s]}}}\n}],(y1)\\ast\\cos\\frac{\\pi}{2}\\}\/.sol1],\\{s,0,TF\\},$\n\n$AxesLabel->\\{\"x\",\"y\",\"z\"\\},PlotStyle->\\{Blue\\}]$\n\nSetPrecision$[Table[\\{s,y1\\ast\\sin[y2]\\ast\\sin[{{{{{y_{3}[s]}}}\n}]\\}\/.sol1,\\{s,0,TF,9.53674316406\\ast10^{-7}\\}],20]$\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}}