Submitted:
04 July 2026
Posted:
06 July 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction
- 1.
- Instead of implicitly relying on sets of free variables syntactically appearing in open formulas, we propose to rather work with explicit declarations of sets of available free variables. This principle enables us to define arbitrary first-order open formulas in arbitrary categories and is especially relevant for many-sorted first-oder logic [17]!
- 2.
-
Treat open formulas as first-class citizens! This principle has, at least, three facets:
- (a)
- Any syntactic entity and, especially, any term and any open formula should have a semantics in any first-order structure. A term syntactically represents a derived operation build up from the basic operations, i.e., the semantics of the operation symbols (in a signature ) fixed by the given -structure . Correspondingly, an open formula syntactically represents a derived predicate assembled, with help of the derived operations, from the basic predicates in .
- (b)
- Introducing contexts implicates that the informal concept open formula splits into two formal concepts, namely expression and statement in context. Open formulas as such, i.e., only relying on free variables, are formalized as expressions. An expressions together with an embedding (binding) of its free variables into a context is called a statement in context.
- (c)
- The principle facilitates a shift of perspective: The actual subjects of first-order logic are not first-order structures as such but single (!) interpretations of contexts in structures. A closed formula simply is a statement in the empty context, i.e., a statement about the only interpretation of the empty context in a first-order structure, and thus a statement about the structure as a whole!
- 3.
- The elements of contexts are, in principal, neither constant symbols nor variables nor elements of carrier sets. Or, to put it the other way around: Of course we can use one and the same entity in different roles, but we should always announce the corresponding role as well as changes of roles!
2. Notations and Preliminaries

- A set of names for operation symbols.
- A set of names for predicate symbols.
- A set of names for variables which is equipped with a fixed total order.
3. Basic Concepts and Constructions in First-Order Logic
3.1. Signatures and Structures
- a finite set of predicate (relation) symbols,
- a finite set of operation (function) symbols, and
- arity functions , , where is a singleton for all . We assume that and are disjoint for all (compare [22]).
- with arity ; and
- with input arities , and output arities .
- a set U, called thecarrierof ,
- a family ofpredicates, i.e., subsets ofvalid assignmentsfor the predicate symbol in , and
- a family ofoperations (functions) in .
- 1.
- implies for all and all assignments , i.e., the post-composition map , with for all , restricts to a map .
- 2.
- for all and all input assignments , i.e., .

- 1.
-
with the set of all natural numbers as carrier.
- is the usual irreflexive order on : iff .
- is the natural number zero: for the only element . is the natural number one: .
- is addition of natural numbers, i.e., for all we do have . is multiplication of natural numbers: for all .
- 2.
-
with the set of all rational numbers as carrier.
- is the usual irreflexive order on : iff .
- is the rational number zero: for the only element . is the rational number one: .
- is addition of rational numbers, i.e., for all we do have . is multiplication of rational numbers: for all .
- 3.
-
with the power set as carrier.
- is the irreflexive inclusion order: iff .
- is the empty set: for the only element . is the set : .
- is union of sets, i.e., for all we do have . is intersection of sets: for all .
3.2. Terms and First-Order Expressions: Syntax
- Variables:
- for all ;
- Constants:
- for all with ;
- Operations:
- for all with and all assignments in .
- 1.
-
Atomic expressions:
- (a)
- Equation: for any Σ-terms .
- (b)
- Relational Atom: for any and any .
- 2.
- Everything: for any set X of variables.
- 3.
- Void: for any set X of variables.
- 4.
- Conjunction: for any expressions and .
- 5.
- Disjunction: for any expressions and .
- 6.
- Implication: for any expressions and .
- 7.
- Negation: for any expression .
- 8.
- Quantification: and for any expression and any proper inclusion .
- bound variables are distinct from free variables, i.e., , and
- all binders bind variables not already in scope, i.e., in case of quantification with and .
- We define new properties/concepts and give them a name to be able to formulate our statements in a more natural language style, like "the sum of two even numbers is also even" for example.
- To formally prove those statements, we have to unfold our definitions. In assembly programming they use the termmacro expansionfor this kind of unfolding.
- On the other hand, we need a mechanism to "fold" our proofs into those natural language like statements.
3.3. Terms and First-Order Expressions: Semantics


- 1.
-
Atomic expressions:
- (a)
- Equation: iff for .
- (b)
- Relational Atom: iff for .
- 2.
- Everything: for all
- 3.
- Void: for none
- 4.
- Conjunction: iff and
- 5.
- Disjunction: iff or
- 6.
- Implication: iff implies
- 7.
- Negation: iff not
- 8.
-
Existential quantification: iff there exists an extension of to Y such thatUniversal quantification: iff for all extensionsof to Y we have
- 1.
-
Atomic expressions:
- (a)
- Equation: for is nothing but the equalizer of the derived operations .
- (b)
- Relational Atom: for .
- 2.
- Everything:
- 3.
- Void:
- 4.
- Conjunction:
- 5.
- Disjunction:
- 6.
- Implication:
- 7.
- Negation:
- 8.
-
Existential quantification:Universal quantification: .
4. First-Order Logics of Statements in Context
4.1. Institutions of Statements
4.1.1. Institutions of Statements: Sentence and Model Functor


4.1.2. Institutions of Statements: Satisfaction Relation and Satisfaction Condition


4.2. Substitutions
4.2.1. Categories of Substitutions
- Objects:
- are all sets X of variables, i.e., ;
- Morphisms:
- in are given by -substitutions ;
- Identities:
- on sets X are given by the canonical maps : ; and the
- Composition:
- of two morphisms , in is given by the -substitution where is the inductive extension of such that
4.2.2. Substitution Application for Expressions
- 1.
-
Atomic expressions:
- (a)
- Equation: for any with given by (15).
- (b)
- Relational Atom: for any and any substitution with given by (15).
- 2.
- Everything:
- 3.
- Void:
- 4.
- Conjunction:
- 5.
- Disjunction:
- 6.
- Implication:
- 7.
- Negation:
- 8.
- Quantification: and for any expression and any proper inclusion where and thus . The extended substitution is constructed as a cotuple (by case distinction). Remind Remark 6 and that Y is the sum of X and in since .
4.2.3. Substitution Application vs Derived Operations


5. Sketches and Arrows between Sketches
5.1. Sketches and Diagrams

5.2. Arrows between Sketches
5.2.1. Sketch Morphisms
5.2.2. Sketch Implications
- Expression:
- First, we do have atomic expressions with their individual semantics in any -structure . This semantics is the set of all variable assignments solving the equation .
- Statements in Context:
- Second, there are for each atomic expression infinite many single statements in contexts where the semantics of in a -structure is the set of all interpretations such that solves the equation .
- Unconditional Assertion:
- Third, we do have for each atomic expression a sketch arrow which is valid in a -structure if, and only if, each solution of the "empty premise" , i.e., all variable assignments , solve the equation or, in other words, if t and r represent the same derived opperation in .

5.2.3. Sketch Arrows and Injectivity

- 1.
- , i.e., satisfies the implication condition for .
- 2.
- The Σ-sketch encoding of is strictly injective w.r.t. .
5.3. Deducing Sketch Implications

6. Licensing Laziness
- 1.
- We declare an explicit context X with .
- 2.
- We require and adapt, in such a way, Barendregt’s variable convention.
- 3.
- We require, moreover, , i.e., a strict separation of free and bound variables.
6.1. Reduction of Contexts
6.2. Extension of Contexts
6.3. -Conversion
6.4. Deducing Specification Implications


7. Deduction in Traditional First-Order Logic
7.1. Hilbert System
7.1.0.1. Axiom A0
7.1.0.2. Axioms A1 - A3
7.1.0.3. Axiom A4
7.1.0.4. Rule MP
7.1.0.5. Rule ∃I
7.2. Gentzen’s System
This is the classical formulation of the calculus of natural deduction. To prepare the things we want to do later (and to get around the somewhat un-licensed extension by hypothetical reasoning in the calculus), we will reformulate the calculus by lifting it to the “judgements level”. Instead of postulating rules that make statements about the validity of propositions, we postulate rules that make statements about derivability. This move allows us to make the respective local hypotheses in Natural Deduction derivations into syntactic parts of the objects (we call them “sequents”) manipulated by the inference rules.

8. Natural Deduction and Open Specification Implications

8.1. Open Specification Implications
- 1.
- and thus
- 2.
- and
- 3.
- .

8.2. Licensing Hypothetical Reasoning

8.3. Validating Hypothetical Reasoning Rules




8.4. Nested Hypothetical Reasoning







9. Conclusions and Further Work
- Open Injectivity
-
Following [30,31], we decided to replace the term "Horn Logics", used in [17], by open injectivity. Open specification implications, introduced in this paper, are a first example of open injectivity. Obviously one could iterate the definition of open specification implications. We are, however, not sure that there really is a reason and/or need to do this at the moment. On the other side, nested open injectivity can only unfold its full potential in the presence of explicit variable declarations and contexts. This full potential is needed to describe and formalize reasoning in Category Theory, for example.Since Category Theory relies on universal properties, there is no need for first-order formulas. Instead, one can use nested open sketch implications based on relational atoms to formalize Category Theory (compare [10]). Therefore, we decided to elaborate in the next paper a full account of this kind of nested open injectivity for arbitrary Logics of Statements in Context with Category Theory as running example. Note, that the habit of "want phrases" in the Fitch notation for Natural Deduction is strongly related to the heuristics of "diagram chasing" in Category Theory!
- LoSiC-Deduction in the Unsorted Case
- Writing this paper, we finally realized that our initial idea to simply borrow deduction calculi from traditional first-order logic was by far too naive. We also learned that substitutions should be used as morphisms between contexts. To also have in this case Institutions of Statements in Context at hand, we have, however, also to allow substitutions as bindings! What has to be done is to upgrade the Institutions of Statements in Context in the present paper to institutions with substitutions as bindings as well as context morphisms. Based on this, the necessary bigger effort should be spend to adapt, at least, one of the traditional deduction calculi to the corresponding upgraded first-order Logics of Statements in Context. We are convinced that Gentzen’s system and its twin Natural Deduction are reasonable candidates to get this job done.
- Traditional Deduction in the Many-Sorted Case
- Another bigger project would be to extend the ideas, constructions and findings of the present paper to traditional many-sorted first-order logic. The remarks concerning the many-sorted case, scattered over the paper, together with [17] should establish a reasonable starting point to attack such a project. In a nutshell, the crucial problem with many-sortedness is that we can not get rid of variables in for a -specification by simply deleting them! That is, assertions as in (29) and Corollary 8, for example, vanish in the many-sorted case. The only chance to get rid of a variable , in a sound way, is to find a -term t over (compare rule "Concretion" in [36]). Note, that the concept of context enables us to address and potentially deal with this issue without utilizing the crutch of universal quantification as it is done in [36].
- Gentzen’s System
Funding
Acknowledgments
Conflicts of Interest
Appendix A. Operators on Predicates
Appendix A.1. Shift, Existential and Universal Operators for Maps
- unit:
- counit:
- adjunction:
- iff
- unit:
- counit:
- adjunction:
- iff

Appendix A.2. Shift, Existential and Universal Operators for Pre-composition Maps
- unit:
- counit:
- adjunction:
- iff
- unit:
- counit:
- adjunction:
- iff

Appendix A.3. Shift, Existential and Universal Operators for Substitutions
- unit:
- counit:
- adjunction:
- iff
- unit:
- counit:
- adjunction:
- iff

References
- Wolter, U. Logics of Statements in Context - Category Independent Basics. Mathematics 2022, 10. [Google Scholar] [CrossRef]
- Chang, C.C.; Keisler, H.J. Model Theory; Studies in Logic and the Foundations of Mathematics; Elsevier Science, 1990. [Google Scholar]
- van Dalen, D. Logic and Structure. In Universitext, 5 ed.; Springer, 2013. [Google Scholar] [CrossRef]
- Walicki, M. Introduction to Mathematical Logic, extended ed.; World Scientific, 2017. [Google Scholar]
- Wechler, Wolfgang. Universal Algebra for Computer Scientists. In Proceedings of the Monographs in Theoretical Computer Science. An EATCS Series.; Springer-Verlag, Berlin Heidelberg, 1992; Vol. 25, p. 339. [Google Scholar] [CrossRef]
- Ehrig, H.; Mahr, B. Fundamentals of Algebraic Specification 1: Equations and Initial Semantics. In EATCS Monographs on Theoretical Computer Science; Springer, 1985; p. 6. [Google Scholar]
- Reichel, H. Initial Computability, Algebraic Specifications, and Partial Algebras; Oxford University Press, 1987. [Google Scholar]
- Loeckx, J.; Ehrich, H.D.; Wolf, M. Specification of Abstract Data Types; Teubner: Leipzig, 1996. [Google Scholar]
- Barr, M.; Wells, C. Category Theory for Computing Science. In Series in Computer Science; Republished in Reprints in Theory and Applications of Categories, No. 22 (2012); Prentice Hall International: London, 1995. [Google Scholar]
- Makkai, M. Generalized Sketches as a Framework for Completeness Theorems. J. Pure Appl. Algebra 1997, 115, 49–79, 179–212, 214–274. [Google Scholar] [CrossRef]
- Cadish, B.; Diskin, Z. Heterogeneous View Integration via Sketches and Equations. In Proceedings of the ISMIS, Heidelberg, 1996; Springer; Vol. 1079, pp. 603–612. [Google Scholar]
- Diskin, Z. Technical Report 9602; Databases as Diagram Algebras: Specifying Queries and Views Via the Graph-Based Logic of Sketches. Frame Inform Systems: Riga, Latvia, 1996.
- Baader, F.; Horrocks, I.; Sattler, U. Handbook of Knowledge Representation chapter 3 Description Logics; Elsevier, 2007. [Google Scholar]
- Ehrig, H.; Ehrig, K.; Prange, U.; Taentzer, G. Fundamentals of Algebraic Graph Transformation. In Monographs in Theoretical Computer Science. An EATCS Series; Springer, 2006. [Google Scholar]
- Rutle, A. Diagram Predicate Framework: A Formal Approach to MDE. PhD thesis, University of Bergen, 2010. [Google Scholar]
- Rutle, A.; Rossini, A.; Lamo, Y.; Wolter, U. A formal approach to the specification and transformation of constraints in MDE. Proc. J. Log. Algebr. Program. 2012, Vol. 81, 422––457. [Google Scholar] [CrossRef]
- Wolter, U. Logics of Statements in Context - First-Order Logic Files. Logics 2025, 3. [Google Scholar] [CrossRef]
- Barendregt, H.P. The Lambda Calculus: Its Syntax and Semantics; North Holland, 1984. [Google Scholar]
- Goguen, J.A.; Burstall, R.M. Institutions: Abstract Model Theory for Specification and Programming. J. ACM 1992, 39, 95–146. [Google Scholar] [CrossRef]
- Diaconescu, R. Institution-Independent Model Theory, 2nd ed.; Birkhäuser Basel, 2025. [Google Scholar] [CrossRef]
- Barwise, K.J. Axioms for Abstract Model Theory. Ann. Math. Log. 1974, 7, 221–265. [Google Scholar] [CrossRef]
- Wolter, U.; Truong, T.T. Graph Algebras and Derived Graph Operations. Logics 2023, 1, 182–239. [Google Scholar] [CrossRef]
- Wolter, U. Institutional frames. In Recent Trends in Data Type Specification, 10th Workshop on Specification of Abstract Data Types joint with the 5th COMPASS Workshop, S. Margherita Italy, May/June 1994, Selected papers; Lecture Notes in Computer Science; Astesiano, E., Reggio, G., Tarlecki, A., Eds.; Springer, 1995; Vol. 906, pp. 469–482. [Google Scholar] [CrossRef]
- Wolter, U.; Martini, A.; Haeusler, E.H. Towards a uniform presentation of logical systems by indexed categories and adjoint situations. J. Log. Comput. Oxf. Univ. Press Advance Access article. 2015, 25, 57–93. [Google Scholar] [CrossRef]
- Lawvere, F.W. Functorial Semantics of Algebraic Theories. In Proceedings of the Proc. National Academy of Science, U.S.A.; Columbia University, 1963; Volume 50, pp. 869–872. [Google Scholar]
- Lawvere, F.W. Functorial Semantics of Algebraic Theories and Some Algebraic Problems in the context of Functorial Semantics of Algebraic Theories. Reprints in Theory and Applications of Categories, Originally published as Ph.D. thesis, Columbia University, 1963 and in Reports of the Midwest Category Seminar II. © Springer-Verlag, 2004; p. 1 – 121 41-61. [Google Scholar]
- Poigné, A. Algebra categorically. In Category Theory and Computer Programming: Tutorial and Workshop, Guildford, U.K. September 16–20, 1985 Proceedings; Pitt, D., Abramsky, S., Poigné, A., Rydeheard, D., Eds.; Springer Berlin Heidelberg: Berlin, Heidelberg, 1986; pp. 76–102. [Google Scholar] [CrossRef] [PubMed]
- de Bruijn, N.G. Lambda Calculus Notation with Nameless Dummies: A Tool for Automatic Formula Manipulation, with Application to the Church-Rosser Theorem. Indag. Math. 1972, 34, 381–392. [Google Scholar] [CrossRef]
- Wolter, U. An Algebraic Approach to Deduction in Equational Partial Horn Theories. J. Inf. Process. Cybern. EIK 1990, 27, 85–128. [Google Scholar]
- Adamek, J.; Herrlich, H.; Strecker, G. Abstract and Concrete Categories; John Wiley, 1990. [Google Scholar]
- Adamek, J.; Hebert, M.; Sousa, L. A Logic of Injectivity. J. Homotopy Relat. Struct. 2007. [Google Scholar] [CrossRef]
- Kohlhase, M.; Rabe, F. Knowledge Representationfor Science, Technology, Engineering, and Mathematics Summer Semester 2020– Lecture Notes –. 2021. Available online: https://kwarc.info/teaching/KRMT/notes-SS21.pdf (accessed on March 2026).
- Wasilewska, A. Logics for Computer Science. In Computer Science; Springer Cham: Cham, Switzerland, 2018. [Google Scholar] [CrossRef]
- Sequent Calculus. Available online: https://en.wikipedia.org/wiki/Sequent_calculus (accessed on 17 February 2026).
- Magnus, P.D. forall x - An Introduction to Formal Logic Open Education Resource (OER); Creative Commons license, 2017; Available online: https://www.fecundity.com/logic/.
- Goguen, J.A.; Meseguer, J. Completeness of Many-Sorted Equational Logic. Houst. J. Math. 1985, 11, 307–334. [Google Scholar]
- Jacobs, B. Categorical Logic and Type Theory. In Studies in Logic and the Foundations ofMathematics, 1 ed.; Elsevier Science, 2001; Vol. 141. [Google Scholar]
- Behr, N. Instantiation Calculus. Keynote Talk at 18th International Conference on Graph Transformation (ICGT 2025), 2025. [Google Scholar]
- Behr, N.; Hirschowitz, T.; Lafont, A.; Moreau, V. A Hyperdoctrinal Reconstruction of Conditional Calculus. Technical report;In Preparation. 2025. [Google Scholar]
- Bruggink, H.J.S.; Cauderlier, R.; Hülsbusch, M.; König, B. Conditional Reactive Systems. In Proceedings of the IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2011), 2011. [Google Scholar] [CrossRef]

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).