\section{Introduction and motivation}
\label{sect:intro}

Today, there are countless approaches towards characterising complexity classes via logic.
Foremost amongst these lies the proof-theoretic approach, characterising classes as the `representable' functions of some logic or theory.
Examples include bounded arithmetic \cite{Buss86book} \cite{Krajicek:1996:BAP:225488} \cite{Cook:2010:LFP:1734064}, applicative theories \cite{Cantini02} \cite{KahOit:13:ph-levels}, intrinsic and ramified theories \cite{Leivant94:intrinsic-theories} \cite{BelHof:02}, fragments of linear logic \cite{GirardSS92:bounded-ll} \cite{Girard94:lll} \cite{Lafont04} \cite{Baillot15} and fragments of intuitionistic logic \cite{Leivant94:found-delin-ptime}.

To some extent there is a distinction between various notions of `representability', namely between logics that \emph{type} terms computing functions of a given complexity class, and theories that prove the \emph{totality} or \emph{convergence} of programs computing functions in a given complexity class.
But a more important (and somewhat orthogonal) distinction is whether the constraints on the logic or theory are
\textit{explicit} or \textit{implicit}, that is to say whether they stipulate some bounds or resources, or whether the bounds are only \textit{consequence} of some logical properties. One important representant of the first category is \textit{bounded arithmetic}, which has been investigated by Buss  \cite{Buss86book}, as a first-order arithmetic with bounded quantifiers. Cobham's function algebra  \cite{Cobham}  for polynomial time is of a similar nature, and indeed is used as a tool for the study of bounded arithmetic. In the second category one can range the systems of \textit{implicit computational complexity}, like for instance function algebras based on restrictions of recursion, such as ramified or safe recursion \cite{BellantoniCook}, arithmetics or logics based on analogous restrictions of induction \cite{Cantini02},  \cite{Leivant94:intrinsic-theories} \cite{BelHof:02},  \cite{Leivant94:found-delin-ptime} and subsystems of linear logic   \cite{Girard94:lll} \cite{Lafont04} .

 Bounded arithmetic is a deep and well-established theory, and one of its interests is its great versatility, as it has enabled to characterize a wide range of complexity classes, such as FP, the polynomial hierarchy FPH, PSPACE, NC \dots It is also tightly related to \textit{proof complexity}
  \cite{Cook:2010:LFP:1734064}, the research field investigating the size of propositional proofs in various proof systems. Finally it is also employed for the research direction of \textit{bounded reverse mathematics}. 
  
  Implicit computational complexity on the other hand is a slightly more recent and less unified line of research. It has the interest of delineating some specific computing disciplines which correspond to classical complexity classes and can help shed some light for instance on the foundational nature of feasibility  (see e.g. \cite{Leivant94:found-delin-ptime}). Another benefit is that implicit complexity systems can sometimes be extended into techniques for statically controlling the complexity of programs, e.g. in functional or imperative languages (\cite{Hofmann99SLR,Hofmann00}, \cite{Marion11} \dots).  However the variety of complexity classes that have been characterized in this implicit way is not as large as for bounded arithmetic. In particular implicit complexity has not managed to characterize non-deterministic classes, such as NP or PH, in a purely logical way. Actually some characterizations of such classes do exist, but they either take the form of a function algebra or of a type system extended with a non-logical feature. 
  
  In fact implicit complexity has taken many of its techniques from a detailed study of the comprehension scheme, of recursion and of the structural rules of proof systems (contraction rule). But it seems to us that first-order quantification has not been investigated as much as it deserves. We believe that this is one reason of the modest achievements of implicit complexity concerning non-deterministic classes.
  
  \patrick{
  \begin{itemize}
  \item our goal: design an unbounded arithmetic for FPH.
  
  motivations: bridge bounded arithmetic and ICC ; enlarge the toolbox of ICC
  \item methodology: use ramification, and calibrate the logic by alternance of quantifiers in induction formulas
  \item key idea: replace the role of bounded quantifiers by safe quantifiers
  \item related works
  \end{itemize}
  }
%
%\anupam{Copied below from DICE submission}
%
%Today, there are countless approaches towards characterising complexity classes via logic.
%Foremost amongst these lies the proof-theoretic approach, characterising classes as the `representable' functions of some logic or theory.
%Examples include bounded arithmetic \cite{Buss86book} \cite{Krajicek:1996:BAP:225488} \cite{Cook:2010:LFP:1734064}, applicative theories \cite{Cantini02} \cite{KahOit:13:ph-levels}, intrinsic and ramified theories \cite{Leivant94:intrinsic-theories} \cite{BelHof:02}, fragments of linear logic \cite{GirardSS92:bounded-ll} \cite{Girard94:lll} \cite{Lafont04} \cite{Baillot15} and fragments of intuitionistic logic \cite{Leivant94:found-delin-ptime}.
%
%To some extent there is a distinction between various notions of `representability', namely between logics that \emph{type} terms computing functions of a given complexity class, and theories that prove the \emph{totality} or \emph{convergence} of programs computing functions in a given complexity class.
%Perhaps a more important (and somewhat orthogonal) distinction for the \textsc{Dice-Fopara} community is whether the constraints on the logic or theory are \emph{implicit} or \emph{explicit}. The former includes constraints such as ramification, type level and substructural considerations, while the latter includes bounded quantification, bounded modalities etc. This distinction is also naturally exhibited in associated function algebras, e.g. Cobham's \emph{limited} recursion on notation \cite{Cobham} vs.\ Bellantoni and Cook's \emph{predicative} recursion on notation \cite{BellantoniCook92}.
%
%Some correlations abound: explicit bounds are typically far more useful for more fine-grained characterisations of complexity classes, e.g.\ levels of the polynomial or arithmetical hierarchies, and often admit witness extraction methods that remain in a ground type programming language, e.g.\ via recursion theoretic characterisations. Implicit bounds, however, are more often associated with higher-typed programming languages, which are arguably more useful for achieving witness extraction at all for powerful theories such as arithmetic and set theory, cf.~\cite{avigad1998godel}, \cite{troelstra1998realizability}. Complexity bounds are harder to obtain, but the framework is nonetheless somewhat more desirable since no bounds occur in the characterisation itself \emph{per se}.
%
%In this line of work we attempt to ameliorate the situation by using implicit methods to delineate fine-grained hierarchies of feasible complexity classes, namely the \emph{polynomial hierarchy}, $\ph$.
%One particular feature of this work that helps make this possible is to break one of the aforementioned correlations: while we use implicit constraints, our witness extraction methods will use only functions of bounded type level. In this way we can naturally appeal to function algebras, which are of ground type in nature, which implicitly characterise $\ph$, namely via \emph{predicative minimisation} \cite{BellantoniThesis}.
%In order to remain in this class of programs and not get lost with higher types, we appeal to the \emph{witness function method} of extracting programs from proofs, a technique developed by Buss \cite{Buss86book} \cite{Buss:95:wfm-arith}, which is ideal for extracting ground programs directly from classical proofs in weak theories.
%This extends work presented in \cite{BaillotDas16}. %at \emph{CSL '16}.
%
%\subsection{State of the art}
%As we have already argued, it is natural to expect that characterisations of hierarchies such as $\ph$ are more readily established by using ground or bounded type witness extraction procedures, due to the correspondence between logical searches in a program and the quantification over objects of ground type in a theory.
%As justification for this position, consider the following table of examples of known characterisations:\footnote{All classes can be taken in their functional variations.}
%%, distinguished by the type level of programs extracted:
%
%\bigskip
%
%\begin{tabular}{c|c|c}
%	Class &	Ground & Higher order\\
%	\hline
%	%	quantifiers  & type-level\\
%	$\nc^i$    & $\mathit{TNC}^i$ \cite{CloTak:1995:nc-ac}, $\mathit{VNC}^i$ \cite{Cook:2010:LFP:1734064} & - \\
%	$\ptime$  &  $S^1_2$ \cite{Buss86book}, \cite{Strahm03}, $V^1$ \cite{Zambella96} \cite{Cook:2010:LFP:1734064} & $\mathit{LLL}$ \cite{Girard94:lll}, $\mathit{SLL}$ \cite{Lafont04} \\
%	$\Box_i$  & $S^i_2$ \cite{Buss86book}, \cite{KahOit:13:ph-levels} & -  \\
%	$\ph$& $S_2$ & - \\
%	$\pspace$& $U^1_2$ \cite{Buss86book} & $\mathit{STA}_B$ \cite{GaboardiMarionRonchi12} \\
%	%	$k$-$\exptime$ & -  & $\mathit{ELL}(k)$ \\
%	Elementary & $I\Delta_0 + \exp$  & $\mathit{ELL}\;  \cite{Girard94:lll}$
%\end{tabular}
%
%\bigskip
%
%\noindent
%Thus, if we want an implicit characterisation of $\ph$ in a logical theory, we should break the apparent (although not universal) link between `implicit' and `higher type'. 
%%If we restrict to the ground setting, where extracted programs do not make use of higher types, we have the following picture.
%%
%% Now, if we restrict to the ground setting, where extracted programs do not make use of higher types, there are still several 
%Now, if we zoom in on the ground setting, where extracted programs do not make use of higher types, there are still several parameters by which the characterisations can vary, in particular:
%\begin{itemize}
%	\item How are programs specified in the language of the theory? By a formula, as in Peano arithmetic, by a first-order equational program, or by an applicative term in the style of combinatory algebra;
%	\item What type of programs are extracted from proofs of the theory? A program of a bounded recursion class, e.g.\ of Cobham's algebra, or of a tiered recursion class, e.g.\ of Bellantoni and Cook's algebra.
%\end{itemize}
%We classify some known characterisations from the literature according to these two parameters in  the following table:
%\bigskip
%
%\begin{tabular}{c|c|c}
%	{
%		%\small model of comp. $\backslash$ extracted program 
%	} & bounded rec. programs & tiered rec. programs \\
%	\hline &&\\
%	formula & $\ph$, $\square_i$ (Buss \cite{Buss86book})&\\
%	%	& bounded induction (Buss \cite{Buss86book}) &\\
%	\hline &&\\
%	equational && $\ptime$\\
%	&& (Leivant \cite{Leivant94:intrinsic-theories}) \\
%	\hline &&\\
%	applicative & $\ptime$ (Strahm \cite{Strahm03})  & $\ptime$ \\
%	&$\ph$ (Kahle-Oitavem \cite{KahOit:13:ph-levels})& (Cantini \cite{Cantini02})
%\end{tabular}
%
%%TODO: improve table to make clear columns and rows, explicit and implicit columns.
%%
%%\begin{tabular}{c|c|c|c}
%%	{
%%		%\small model of comp. $\backslash$ extracted program 
%%		} & Cobham & mon. constraints & BC-like \\
%%	\hline &&\\
%%	formula & PH, $\square_i$&&\\
%%	& bounded induction (Buss) &&\\
%%	\hline &&\\
%%	equational &&& P\\
%%	&&& (Leivant) \\
%%	\hline &&\\
%%	applicative &&PH & P \\
%%	&&(Kahle-Oitavem)& (Cantini)
%%\end{tabular}
%
%\bigskip
%
%\noindent
%Our goal is to extend the approach using extraction of programs of a tiered recursion class (second column), using the equational style of specification (second row), to the whole of the polynomial hierarchy, i.e.\  $\ph$ and its levels $\square_i$.
%%Our goal is to extend the implicit approach, via variations of Bellantoni-Cook (BC) programs, to the whole of the polynomial hierarchy.