DeepDual Core Release: Expanded Plan

We realized that to achieve architectural completeness, we need to expand the release version of DeepDual Core by adding a number of crucial libraries. Below, we describe exactly what we are adding to our architecture.

First of all, we decided to replace the former DD_Diff library, initially planned only for nilpotent differentiation, with a whole range of libraries. These are divided into two categories, both supporting the computation of total, partial, and mixed derivatives of functions with any number of variables.

CLASSIC DIFFERENTIATION

Implementation of classical approaches to differentiation using automatic and numerical methods, applicable to functions with carriers that are fields, as well as natural, fractional, and complex derivative orders.

  • DD_NaturalDiff: automatic differentiation for computing derivatives of natural orders for functions over real and complex numbers.
  • DD_RiemannLiouville: numerical computation of the Riemann-Liouville integral of fractional and complex orders for functions over real and complex numbers.
  • DD_FractionalDiff: numerical-automatic computation of Riemann-Liouville and Caputo derivatives of fractional orders for functions over real and complex numbers.
  • DD_ComplexDiff: numerical-automatic computation of Riemann-Liouville and Caputo derivatives of complex orders for functions over real and complex numbers.

NILPOTENT DIFFERENTIATION

An alternative approach based on Nilpotent Analysis, created by our founder Michael Clark El, which prospectively allows the differentiation of functions with almost arbitrary carriers and orders. The results of fractional derivative computations may differ from classical approaches.

  • DD_NilpotentDiff: differentiation of functions based on nilpotent expansions from DD_Nilpotent.

We have also decided to expand our set of utilities.

One of the most important mechanics we decided to include in the release is the compile-time verification of types and axioms. This is an incredibly difficult task, since the use of C++20 concepts allows only syntactic checks, not semantic ones, making it impossible to verify axioms solely with concepts.

However, we found a solution in the form of a trait system: users can easily link their data types with our trait system by writing just a few lines of code. This allows the entire system to mathematically identify their types and the axioms they satisfy. This combination of traits and concepts enables the verification of types and axioms at compile-time, provided the linking is done correctly, thereby avoiding any additional runtime overhead.

The types provided by DeepDual Core will be automatically linked to this trait-concept system.

To use this system, the DD_TraitUtils, DD_TypeUtils, DD_AxiomUtils, and DD_MathUtils libraries must be included. It is possible to include only a subset of them for specialized tasks.

Additionally, we are moving away from using std::string for error handling in favor of an arbitrary type, which optimizes computations involving std::expected.

The list of new utility libraries in the architecture is provided below.

UTILS

New auxiliary utility libraries:

  • DD_TraitUtils: identifier traits for types and axioms. Needed to declare properties to the program that are already known to the user or the system itself.
  • DD_AxiomUtils: utilizes types identified in DD_TypeUtils via traits from DD_TraitUtils to determine which axioms hold for an arbitrary type using concepts based on the known data.
  • DD_MathUtils: utilizes the full spectrum of known information to determine whether a user-defined data type belongs to a specific mathematical type, taking into account inter-type relationships, and verifies axioms using concepts based on the known data.
  • DD_ErrorUtils: arbitrary types for storing errors, no longer limited to just std::string.

The implementation of formal logic and category theory in DeepDual Core has also been rethought.

They are now separated into two distinct type categories: LOGIC TYPES and CATEGORY TYPES.

The following libraries have been added:

LOGIC TYPES

The content of the former DD_Logic has been redistributed among the following libraries:

  • DD_Predicate: storing predicates as objects.
  • DD_Sort: sorts of variables.
  • DD_Var: storing variables as objects of formal logic rather than as values.
  • DD_Term: implementation of terms.
  • DD_Connective: representation of logical connectives (including &, |, etc.) in an object-oriented style.
  • DD_Quantifier: quantifiers (existential, universal, uniqueness) as software entities.
  • DD_Formula: formulas as objects.

CATEGORY TYPES

New libraries for implementing category theory in software code:

  • DD_Set: storing sets as objects using membership predicates for mathematically correct interaction with infinite sets.

Among other things, we have also decided to include the DD_Tensor library, implementing tensors, in the DeepDual Core release plan to ensure the completeness of tensor and geometric types.

Our team is also in the process of discussing the possibility of adding a few more libraries:

  • DD_VariableDiff: a classical approach to computing variable-order derivatives of functions over real or complex numbers, where the order is a variable taking real or complex values.
  • DD_Top: storing topologies and topological spaces as objects.
  • DD_Module: a generalization of vectors to structures that can be built not only over a field but also over a ring. In the special case (if the ring turns out to be a field), they reduce to vectors.

The DD_PredicateMatrix library for working with predicate matrices is still being considered for inclusion in the DeepDual Core release version.

Thank you for being with us on this journey!