We’ll roughly follow the Elephant and Seely. The following is all entirely standard and here only to fix notation and terminology.
A signature is a collection of types, together with function symbols and relation symbols , where is a finite list of types.
For each sort there should be an inexhaustible supply of fresh variables of sort . A context is a finite list of variables, and the sort of a context is the list of the sorts of the variables in it.
A term of sort is either a variable of of sort or an expression of the form where and each is a term of sort . The free variables of a term are precisely the variables that appear in it.
The formulas of regular logic are built up from the atomic formulas (where the sort of is the sort of ) and (where and are terms of sort ) using (true), (conjunction) and . The free variables of a formula are defined in the usual way. A context is suitable for a formula (term ) if the free variables of () are contained in . A formula (term ) taken in some suitable context will be written (), and by itself will often mean , with the free variables in some canonical order.
The substitution of the terms for the variables is defined as usual, as is the substitution .
A sequent (wrt a given signature) is an expression where the context is suitable for both and . A theory is a set of sequents (over the same signature, obviously).
The inference rules of regular logic are the usual ones, including these
where contains the variables of the terms . The other rules are as in Seely. We also have to add the Frobenius axiom , where is not in .
Proofs are considered up to the rewrites given in Seely and Prawitz, together with those making the Frobenius axiom the two-sided inverse to the usual proof of the converse (see e.g. Elephant p. 832).
Models of regular theories are regular fibrations.
If is a regular fibration, then an interpretation of a signature assigns
to each sort an object of
to each list of sorts the product
to each function symbol a morphism in
to each relation symbol an object in (the fibre of over )
Given an interpretation of a signature, terms and formulas over it are given the following meanings:
.
.
, where is the pairing of the meanings of the .
, where is the diagonal.
and are interpreted by the finite products in , of course, and by the left adjoints to product projections .
An interpretation satisfies a sequent , written , if there is a vertical morphism over where is the sort of .
An interpretation is a model of a theory, written , if it satisfies each sequent contained in the theory.
If a theory proves a sequent , then for any model of , .
…