Recently, a design criterion depending on a lattice's volume and theta series, called the secrecy gain, was proposed to quantify the secrecy-goodness of the applied lattice code for the Gaussian wiretap channel. To address the secrecy gain of Construction $\text{A}_4$ lattices from formally self-dual $\mathbb{Z}_4$-linear codes, i.e., codes for which the symmetrized weight enumerator (swe) coincides with the swe of its dual, we present new constructions of $\mathbb{Z}_4$-linear codes which are formally self-dual with respect to the swe. For even lengths, formally self-dual $\mathbb{Z}_4$-linear codes are constructed from nested binary codes and double circulant matrices. For odd lengths, a novel construction called odd extension from double circulant codes is proposed. Moreover, the concepts of Type I/II formally self-dual codes/unimodular lattices are introduced. Next, we derive the theta series of the formally unimodular lattices obtained by Construction $\text{A}_4$ from formally self-dual $\mathbb{Z}_4$-linear codes and describe a universal approach to determine their secrecy gains. The secrecy gain of Construction $\text{A}_4$ formally unimodular lattices obtained from formall
This paper introduces the family of lattice-like packings, which generalizes lattices, consisting of packings possessing periodicity and geometric uniformity. The subfamily of formally unimodular (lattice-like) packings is further investigated. It can be seen as a generalization of the unimodular and isodual lattices, and the Construction A formally unimodular packings obtained from formally self-dual codes are presented. Recently, lattice coding for the Gaussian wiretap channel has been considered. A measure called secrecy function was proposed to characterize the eavesdropper's probability of correctly decoding. The aim is to determine the global maximum value of the secrecy function, called (strong) secrecy gain. We further apply lattice-like packings to coset coding for the Gaussian wiretap channel and show that the family of formally unimodular packings shares the same secrecy function behavior as unimodular and isodual lattices. We propose a universal approach to determine the secrecy gain of a Construction A formally unimodular packing obtained from a formally self-dual code. From the weight distribution of a code, we provide a necessary condition for a formally self-dual co
Formally verified compilers and formally verified static analyzers are a solution to the problem that certain industries face when they have to demonstrate to authorities that the object code they run truly corresponds to its source code and that it satisfies certain properties. From a scientific and technological point of view, they are a challenge: not only a number of nontrivial invariants and algorithms must be proved to be correct, but also the implementation must be reasonably effective so that the tools operate within reasonable time. Many optimizations in compilers rely on static analysis, and thus a formally verified compiler entails formally verified static analyses.In this article, we explain some difficulties, possible solutions, design choices and trade-offs pertaining to verified static analysis, in particular when the solution of the analysis is expressed as some form of tree, map or set.
We formally verify an algorithm for approximate policy iteration on Factored Markov Decision Processes using the interactive theorem prover Isabelle/HOL. Next, we show how the formalized algorithm can be refined to an executable, verified implementation. The implementation is evaluated on benchmark problems to show its practicability. As part of the refinement, we develop verified software to certify Linear Programming solutions. The algorithm builds on a diverse library of formalized mathematics and pushes existing methodologies for interactive theorem provers to the limits. We discuss the process of the verification project and the modifications to the algorithm needed for formal verification.
Let $\mathcal{C}$ be a category with pullbacks. We define a $\textit{Beck torsor}$ in $\mathcal{C}$ as a morphism $Z\to Y$ in $\mathcal{C}$ which is a torsor for a Beck module over $Y$. We say that an object $X$ of $\mathcal{C}$ is $\textit{formally unramified}$ if, for every Beck torsor $Z\to Y$ in $\mathcal{C}$, the canonical map $\text{Hom}_{\mathcal{C}}(X, Z)\to \text{Hom}_{\mathcal{C}}(X, Y)$ is injective. If $A$ is a commutative ring with identity, then an $A$-algebra $B$ is formally unramified in the category of $A$-algebras if and only if the ring homomorphism $A\to B$ is formally unramified. Given that $A\to B$ is formally unramified if and only if $Ω_{B/A} = 0$, we seek a similar classification for general formally unramified objects. We say that $\mathcal{C}$ has $\textit{Kähler differentials}$ if, for each object $X$ of $\mathcal{C}$, the forgetful functor $\text{Ab}(\mathcal{C}/X)\to \mathcal{C}/X$ from the category of Beck modules over $X$ has a left adjoint $Ω: \mathcal{C}/X\to \text{Ab}(\mathcal{C}/X)$. Our main result is that if $\mathcal{C}$ has Kähler differentials, then an object $X$ of $\mathcal{C}$ is formally unramified if and only if $Ω_X$ is a zero object i
An involution $#$ on an associative ring $R$ is \textit{formally real} if a sum of nonzero elements of the form $r^# r$ where $r \in R$ is nonzero. Suppose that $R$ is a central simple algebra (i.e. $R=M_n(D)$ for some integer $n$ and central division algebra $D$) and $#$ is an involution on $R$ of the form $r^# = a^{-1} r^\ast a$, where $\ast$ is some transpose involution on $R$ and $a$ is an invertible matrix such that $a^\ast=\pm a$. In section 1 we characterize formal reality of $#$ in terms of $a$ and $\ast|_D$. In later sections we apply this result to the study of formal reality of involutions on crossed product division algebras. We can characterize involutions on $D=(K/F,Φ)$ that extend to a formally real involution on the split algebra $D \otimes_F K \cong M_n(K)$. Every such involution is formally real but we show that there exist formally real involutions on $D$ which are not of this form. In particular, there exists a formally real involution $#$ for which the hermitian trace form $x \mapsto \tr(x^#x)$ is not positive semidefinite.
Dynamic reliability block diagrams (DRBDs) are introduced to overcome the modeling limitations of traditional reliability block diagrams, such as the inability to capture redundant components. However, so far there is no algebraic framework that allows conducting the analysis of a given DRBD based on its structure function and enables verifying its soundness using higher-order logic (HOL) theorem proving. In this work, we propose a new algebra to formally express the structure function and the reliability of a DRBD with spare constructs based on basic system blocks and newly introduced DRBD operators. We present several simplification properties that allow reducing the structure of a given DRBD. We provide the HOL formalization of the proposed algebra, and formally verify its corresponding properties using the HOL4 theorem prover. This includes formally verifying generic reliability expressions of the spare construct, series, parallel and deeper structures in an extensible manner that allows verifying the reliability of complex systems. Finally, we demonstrate the applicability of this algebra by formally analyzing the terminal reliability analysis of a shuffle-exchange network in
We consider lattice coding for the Gaussian wiretap channel, where the challenge is to ensure reliable communication between two authorized parties while preventing an eavesdropper from learning the transmitted messages. Recently, a measure called the secrecy function of a lattice coding scheme was proposed as a design criterion to characterize the eavesdropper's probability of correct decision. In this paper, the family of formally unimodular lattices is presented and shown to possess the same secrecy function behavior as unimodular and isodual lattices. Based on Construction A, we provide a universal approach to determine the secrecy gain, i.e., the maximum value of the secrecy function, for formally unimodular lattices obtained from formally self-dual codes. Furthermore, we show that formally unimodular lattices can achieve higher secrecy gain than the best-known unimodular lattices from the literature.
The concept of formal duality was proposed by Cohn, Kumar and Schürmann, which reflects a remarkable symmetry among energy-minimizing periodic configurations. This formal duality was later on translated into a purely combinatorial property by Cohn, Kumar, Reiher and Schürmann, where the corresponding combinatorial objects were called formally dual pairs. Almost all known examples of primitive formally dual pairs satisfy that the two subsets have the same size. Indeed, prior to this work, there was only one known example having subsets with unequal sizes in $\mathbb{Z}_2 \times \mathbb{Z}_4^2$. Motivated by this example, we propose a lifting construction framework and a recursive construction framework, which generate new primitive formally dual pairs from known ones. As an application, for $m \ge 2$, we obtain $m+1$ pairwise inequivalent primitive formally dual pairs in $\mathbb{Z}_2 \times \mathbb{Z}_4^{2m}$, which have subsets with unequal sizes.
This paper is concerned with formally self-adjoint difference equations and their positive and negative deficiency indices. It is shown that the order of any formally self-adjoint difference equation is even, and some characterizations of formally self-adjoint difference equations are established. Further, we show that the positive and negative deficiency indices are always equal, which implies the existence of the self-adjoint extensions of the minimal linear relations generated by the difference equations. This is an important and essential difference between formally self-adjoint difference equations and their corresponding differential equations in the spectral theory.
The notion of a formally smooth bimodule is introduced and its basic properties are analyzed. In particular it is proven that a $B$-$A$ bimodule $M$ which is a generator left $B$-module is formally smooth if and only if the $M$-Hochschild dimension of $B$ is at most one. It is also shown that modules $M$ which are generators in the category $σ[M]$ of $M$-subgenerated modules provide natural examples of formally smooth bimodules.
We formally verify executable algorithms for solving Markov decision processes (MDPs) in the interactive theorem prover Isabelle/HOL. We build on existing formalizations of probability theory to analyze the expected total reward criterion on infinite-horizon problems. Our developments formalize the Bellman equation and give conditions under which optimal policies exist. Based on this analysis, we verify dynamic programming algorithms to solve tabular MDPs. We evaluate the formally verified implementations experimentally on standard problems and show they are practical. Furthermore, we show that, combined with efficient unverified implementations, our system can compete with and even outperform state-of-the-art systems.
A field extension $L/K$ of characteristic $p > 0$ is formally étale if and only if the relative Frobenius of $L/K$ is an isomorphism. Inspired by this classical result, we explore whether the formally étale property for a map $R \to S$ of $\mathbf{F}_p$-algebras is characterized by isomorphism of the relative Frobenius $F_{S/R}$. While $F_{S/R}$ being an isomorphism implies $R \to S$ is formally étale, the converse fails in the non-Noetherian setting. Thus, following Morrow, we introduce an enhancement of the formally étale property that we call b-nil (bounded nil) formally étale, and we show that $F_{S/R}$ is an isomorphism precisely when $R \to S$ is b-nil formally étale. We prove this result by first establishing several structural properties of b-nil formally smooth maps, which are defined analogously to the formally smooth case. Our structural results reveal that the b-nil formally smooth (resp. étale) property is quite different from the formally smooth (resp. étale) property. For instance, we show that any b-nil formally smooth algebra over an $F$-pure ring is reduced, whereas non-reduced formally étale algebras exist over $\mathbf{F}_p$ by a construction of Bhatt. We als
We establish an equivalence between categories of 'formally nilpotent' Lie algebras and exponential groups in characteristic zero. It extends the equivalences of Mal'cev, Lazard, Quillen and Warfield, and applies to groups under composition of generalized formal series or automorphisms of algebras of generalized formal series. We obtain first-order transfer results from finite dimensional nilpotent objects to formally nilpotent ones. We give applications to solving equations over groups, to the theory of nilpotent exponential groups as per Miasnikov-Remeslennikov, and to definability problems in certain groups of formal series.
Network topology matrices are algebraic representations of graphs that are widely used in modeling and analysis of various applications including electrical circuits, communication networks and transportation systems. In this paper, we propose to use Higher-Order-Logic (HOL) based interactive theorem proving to formalize network topology matrices. In particular, we formalize adjacency, degree, Laplacian and incidence matrices in the Isabelle/HOL proof assistant. Our formalization is based on modelling systems as networks using the notion of directed graphs (unweighted and weighted), where nodes act as components of the system and weighted edges capture the interconnection between them. Then, we formally verify various classical properties of these matrices, such as indexing and degree. We also prove the relationships between these matrices in order to provide a comprehensive formal reasoning support for analyzing systems modeled using network topology matrices. To illustrate the effectiveness of the proposed approach, we formally analyze the Kron reduction of the Laplacian matrix and verify the total power dissipation in a generic resistive electrical network, both commonly used in
Formal mathematics is mathematics done within the framework of a formal logic. It offers major benefits to mathematicians as well as to computing professionals, engineers, and scientists who use mathematics in their work. The standard approach to formal mathematics, in which mathematics is done with the help of a proof assistant and all details are formally proved and mechanically checked, achieves these benefits and offers a very high level of assurance that the results produced are correct. However, since the main goal of the standard approach is certification, the proof assistants supporting the standard approach are generally complex, based on unfamiliar logics, difficult to learn how to use, and far removed from mathematical practice. Thus the standard approach does not adequately serve mathematics practitioners who are more interested in communicating mathematical ideas than in formally certifying their correctness or who prefer not to make the investment needed to gain proficiency in the use of a proof assistant. This paper presents an alternative to the standard approach that focuses on communication and accessibility, the two weaknesses of the standard approach. It is call
Let $X$ be a smooth proper variety over an algebraically closed field of positive characteristic $p$. We find cohomological conditions for the Artin-Mazur formal group functors $Φ^{i}(X,\mathbb{G}_m)$ to be formally smooth. We show that if all crystalline cohomology groups of $X$ are torsion-free (e.g. if $X$ is an abelian variety) then all of the $Φ^{i}(X,\mathbb{G}_m)$ are representable and formally smooth. We then identify a necessary condition for formal smoothness, which we use to give examples, for any $d\ge2$, of varieties $X$ for which $Φ^{i}(X,\mathbb{G}_m)$ is formally smooth when $i<d$, whereas $Φ^{d}(X,\mathbb{G}_m)$ is not. The constructions are inspired by Igusa's surface with non-smooth Picard scheme. Finally, we give a condition equivalent to formal smoothness in terms of Serre's Witt vector cohomology. The strategy relies on the notion of $C$-smoothness - where $C$ is the group algebra of $\mathbb{Q}_p/\mathbb{Z}_p$ - which is a condition that detects when a formal group is formally smooth, and on the use of the Nygaard filtration to relate fppf cohomology to crystalline cohomology.
Recent advances have shown the effectiveness of self-evolving LLM agents on tasks such as program repair and scientific discovery. In this paradigm, a planner LLM synthesizes an agent program that invokes parametric models, including LLMs, which are then tuned per task to improve performance. However, existing self-evolving agent frameworks provide no formal guarantees of safety or correctness. Because such programs are often executed autonomously on unseen inputs, this lack of guarantees raises reliability and security concerns. We formulate agentic code generation as a constrained learning problem, combining hard formal specifications with soft objectives capturing task utility. We introduce Formally Guarded Generative Models (FGGM), which allow the planner LLM to specify a formal output contract for each generative model call using first-order logic. Each FGGM call wraps the underlying model in a rejection sampler with a verified fallback, ensuring every returned output satisfies the contract for any input and parameter setting. Building on FGGM, we present SEVerA (Self-Evolving Verified Agents), a three-stage framework: Search synthesizes candidate parametric programs containin
Auto-formalization aims to translate informal mathematical content into formal languages that can be processed by theorem provers. However, directly targeting existing theorem provers requires LLMs to bridge a substantial representational gap between informal mathematical writing and formal proof languages. This gap also makes semantic consistency difficult to evaluate. We address these difficulties by introducing a Relaxed Natural Formal Language (Relaxed NFL) as an intermediate target for auto-formalization. The Relaxed NFL is designed to remain close to informal mathematical writing: it preserves the usual structure of informal reasoning and allows partially specified expressions and propositions, without requiring their precise interpretation to be fixed at the auto-formalization stage. The remaining ambiguity and implicitness inherited from informal reasoning are resolved during a later elaboration stage, which transforms Relaxed NFL proofs into Core Natural Formal Language (Core NFL) proofs with formally defined semantics. The elaboration procedure combines rule-based transformations with LLM-generated heuristics, while maintaining verifiability through explicit constraints o
Traditional approaches for validating molecular simulations rely on making software open source and transparent, incorporating unit testing, and generally employing human oversight. We propose an approach that eliminates software errors using formal logic, providing proofs of correctness. We use the Lean theorem prover and programming language to create a rigorous, mathematically verified framework for computing molecular interaction energies. We demonstrate this in LeanLJ, a package of functions, proofs, and code execution software that implements Lennard Jones energy calculations in periodic boundaries. We introduce a strategy that uses polymorphic functions and typeclasses to bridge formal proofs (about idealized Real numbers) and executable programs (over floating point numbers). Execution of LeanLJ matches the current gold standard NIST benchmarks, while providing even stronger guarantees, given LeanLJ's grounding in formal mathematics. This approach can be extended to formally verified molecular simulations, in particular, and formally verified scientific computing software, in general. Keywords: Formal verification, Lean 4, molecular simulations, functional programming.