Real interleavings and their extended distance
An epsilon-interleaving compares two real-indexed modules by natural maps into each other's shifts. Their two composites must equal the original modules' structure maps across twice the shift. The API constructs the shifts and these comparison maps from real parameters and structure maps. Taking the infimum of all admissible finite parameters gives an extended pseudometric, with no assumption that the infimum is attained.
Modules, parameters and shifts
Fix a ring R : Type u and modules M N : PModule.{u,0,w} R ℝ. The coefficient
and module-carrier universes are independent. No finite-dimensionality,
constructibility or chosen decomposition is required. Parameters ε δ : ℝ≥0
are finite nonnegative real numbers; there is no shift by infinity.
RealShift.translation ε is the order homomorphism t ↦ t+ε.
RealShift.shift ε reindexes modules and natural transformations along it:
The shifted structure map from s to t is the original map from s+ε to
t+ε. Thus positive shift moves an interval's support to the left.
The canonical zeroIso M : S₀M ≅ M and
compIso ε δ M : Sε(SδM) ≅ S(ε+δ)M apply M to the real-index equalities
t+0=t and (t+ε)+δ=t+(ε+δ). They are natural in M and satisfy the unit
and associative coherence equations. Parameter equalities use congrIso;
the coherence statements display these transports explicitly.
Transitions and the two witness equations
The transition ηεM, written RealShift.transition ε M, has component
the structure map M[t≤t+ε]. It is natural in the real index and
commutes with every module transformation. The zero transition is the inverse
of zeroIso; two transitions, followed by compIso, give η(ε+δ)M.
A value of RealInterleaving ε M N contains natural transformations
and both identities
where μ is the constructed compIso ε ε and 2ε means ε+ε.
At t, the first composite is f_t followed by g_(t+ε) and the transport
from (t+ε)+ε to t+2ε; it equals M[t≤t+2ε]. The other composite has the
same condition for N. equations_iff proves equivalence of the natural-
transformation equations and these component equations. ofApp accepts natural maps and proofs of the component equations.
Q-tame algebraic interpolation
Let M and N be q-tame real persistence modules over a field, and let
i : RealInterleaving ε M N be an actual finite-parameter witness. For each
s ∈ [0, ε], the public definition RealInterleaving.interpolatingModule i s
constructs F_s as a cokernel in the category of real persistence modules.
RealInterleaving.interpolatingModule_qTame_interpolation states the properties
below for this family, and RealInterleaving.exists_qTame_interpolating_family
is their existential form. Write φ and ψ for
the witness's maps from M to shifted N and from N to shifted M.
At time t, the numerator is M(t-s) × N(t-ε+s). The relation map has source
M(t-2ε+s) × N(t-ε-s) and is
Naturality of the witness maps makes the relation compatible with the module
structure maps. The two interleaving composite identities identify the endpoint
quotients with M at s=0 and N at s=ε by the natural isomorphisms
interpolatingModuleStartIso and interpolatingModuleEndIso; every F_s
is q-tame. Every pair s,r in the interval has the actual
interpolatingModuleInterleaving i s r : RealInterleaving (nndist s r) F_s F_r.
The proof descends the two cross maps to the cokernels and checks both
double-shift identities. It covers ε=0 as
well.
This theorem proves an algebraic interpolation of the actual input modules. It does not itself decompose the intermediate modules into interval summands or prove a bottleneck-distance bound; those require a separate matching theorem.
Enlargement, composition and isomorphism transport
For ε ≤ δ, RealShift.shiftLE has components M[t+ε≤t+δ].
RealInterleaving.mono postcomposes both comparison maps with these
structure maps, producing a δ-interleaving.
Given an ε-interleaving between M,N and a δ-interleaving between N,P,
RealInterleaving.trans gives an (ε+δ)-interleaving between M,P.
Its forward map is
The reverse map uses the comparisons in reverse order and the canonical
identification of δ+ε with ε+δ. Naturality moves the intermediate
structure maps past the comparisons; the original two witness equations then
give both double-shift equations for the sum.
RealInterleaving.congr transports both modules along natural isomorphisms,
conjugating the comparison maps without changing the parameter.
Zero interleavings and the zero module
RealInterleaving.symm exchanges the maps; refl uses the transitions.
zeroEquivIso gives an equivalence between zero-interleaving witnesses and
natural isomorphisms. Its two conversions are inverse, using the constructed
unit and composition coherences.
For the zero functor, nonempty_zero_iff proves
In one direction the maps to and from the shifted zero module are zero, so the witness equation forces annihilation. In the other direction the zero maps construct the witness. This criterion uses the structure map.
The checked interval examples use the existing field-valued
RealBarcode.intervalModule. At ε=1, [0,2) interleaves with zero: exact
death is excluded, so its double-shift maps vanish. At ε=1, [0,3) does
not: the map from parameter 0 to 2 preserves coefficient 1.
The essential interval [0,∞) fails the criterion at every finite ε, because
the map from 0 to 2ε preserves 1. A field has 1≠0; this nontriviality
is needed for the negative examples. The basic ring-valued API does not impose it.
The kernel and cokernel shortness results prove that either interleaving morphism has defects with zero double-shift transitions. They use the witness equations and naturality of the kernel inclusion and cokernel projection, over the same rings.
Distance, infinity and approximation
realInterleavingDistance M N : ℝ≥0∞ is
The empty infimum is infinity. Thus d_I=⊤ holds exactly when there is no
finite-parameter interleaving; an essential interval and zero give such a pair.
Every ε-witness gives d_I≤ε. For any extended bound r : ℝ≥0∞,
At r=0 both sides are false; at r=⊤ this is existence of a finite witness.
The weak bound d_I≤ε alone does not supply an ε-witness.
The distance is symmetric, is zero on the diagonal, is invariant under natural isomorphism in each argument, and satisfies
This includes infinite summands. The proof bounds the distance by ε+δ for
every pair of witnesses and distributes ENNReal addition over their infima;
it requires neither an optimal parameter nor a nonempty witness set.
Zero distance is equivalent to interleavings at every positive finite parameter. It need not give a zero-interleaving or a natural isomorphism. The explicit ephemeral example over ℚ has fiber ℚ at time zero and zero elsewhere. Its maps are identity when both indices are zero and zero otherwise; ordered intermediate indices ensure the functor composition law. Every positive double-shift map is zero, while the time-zero fiber is nonzero. It therefore has distance zero from the zero module with no zero-interleaving: this infimum is not attained. The distance API is a plain function with extended pseudometric laws, without a separation or attainment assertion.
Rank obstructions and zero-transition witnesses
For a field-valued ε-interleaving of M and N, the first witness equation writes the
structure map M(t → t + 2ε) as a composite through the single middle fibre N(t + ε).
Consequently, if that fibre is finite-dimensional, its dimension bounds the rank of the
structure map; if it is zero, the structure map is zero. The symmetric rank bound exchanges
M and N. These are finrank_range_structureMapLinear_le_of_realInterleaving, its primed
form, and structureMap_eq_zero_of_realInterleaving in
TDA.Persistence.RealInterleavingRankObstruction. They require no finiteness at other fibres.
isEmpty_realInterleaving_of_finrank_lt rules out a witness when one such structure-map rank
exceeds the dimension of the finite-dimensional middle fibre. The zero-fibre obstruction
isEmpty_realInterleaving_of_structureMap_ne_zero applies when the middle fibre is zero and the
structure map is nonzero. If the appropriate obstruction exists for every finite ε < r,
le_realInterleavingDistance_of_finrank_lt or
le_realInterleavingDistance_of_structureMap_ne_zero, respectively, proves r ≤ d_I(M,N).
The parameter r may be zero or infinity; the lower bound follows from the actual finite
witnesses in the definition of the distance and requires no minimizing parameter.
Over a ring, if both modules' structure maps across 2ε vanish at every real parameter, the
zero comparison maps satisfy both witness equations. Thus
nonempty_realInterleaving_of_structureMap_eq_zero constructs an ε-interleaving between the
two modules. This is a two-module construction; RealInterleaving.nonempty_zero_iff is the
separate criterion for interleaving one module with the zero module.
For the existing field-valued interval module, RealBarcode.transition_eq_zero_iff and
RealBarcode.interleaved_zero_iff give the exact finite-bar threshold: a nonempty half-open
interval [b,d) interleaves with zero exactly when d - b ≤ 2ε, including equality. The
existing RealBarcode.essential_not_interleaved_zero rules out every finite parameter for an
essential interval. These interval criteria illustrate the obstruction API's boundary cases;
they are established separately from its generic statements.
Positive scaling
For c : ℝ with hc : 0 < c, PModule.scale c hc M reindexes M along
t ↦ c⁻¹ * t, so its value at t is M.obj (c⁻¹ * t). This direction agrees
with FilterFunction.scale and scale_sublevel, and with Diagram.scale: a
bar [b, d) becomes [c b, c d).
Scaling and shifting commute through PModule.scaleShiftIso. Its component is
the transport induced by
Consequently, RealInterleaving.scale sends an ε-interleaving to a
Real.toNNReal c * ε-interleaving of the scaled modules, and
nonempty_realInterleaving_scale_iff gives the converse witness equivalence.
The exact distance law is
as stated by realInterleavingDistance_scale. It holds over every ring, with
no constructibility or finite-dimensionality hypothesis, and includes infinite
distance: realInterleavingDistance_scale_eq_top_iff preserves the value ⊤.
The hypothesis 0 < c is essential. A negative factor is not monotone, while
the factor 0 gives a constant reindexing; for the essential infinite-distance
case its left-hand distance is ⊤ but the proposed right-hand side is
0 * ⊤ = 0.
Constructible and sublevel bridge
For a finite critical grid, FiniteConstructible.scaleGrid and
FiniteConstructible.IsConstructible.scale transport constructibility to the
scaled module. FiniteConstructible.moduleDiagram_scale says that the diagram
on the scaled grid is Diagram.scale of the original diagram, paralleling the
shift diagram formula; the bottleneck form
FiniteConstructible.bottleneck_moduleDiagram_scale is the corresponding
finite-constructible isometry route.
At the filtration level, sublevelModule_scale is an equality, and
realInterleavingDistance_sublevelModule_scale gives the same exact distance
law over any ring. Finally, moduleDiagram_sublevelModule_scale agrees with
dgm_scale, so filter scaling and module scaling produce the same diagram.
At log scale, positive filter scaling translates logDgm by log c and the log-scale bottleneck and interleaving distances are scale invariant; see log-scale diagrams.
Source and scope
Bauer--Lesnick, arXiv:1311.3681v4, §3.1, defines the field-valued shift, transition, interleaving and distance with these conventions; Remark 3.1 supplies enlargement and additive composition. Positive scaling and its exact interleaving-distance law are library extensions of BL15-v4 §3.1, not theorems of that source. The ring-valued constructions, explicit coherence and zero-module criterion are proved library extensions and consequences. The unconditional ENNReal triangle also includes infinite summands, where the inequality is automatic. Source manifestation and rights metadata are recorded in BL15-v4.
Concrete witnesses from inclusions of simplicial filtrations, including the log-scale Čech–Rips interleaving, are constructed in inclusion interleavings.
Generic flows remain separate. The
matching-to-interleaving construction supplies
concrete witnesses and d_I≤d_B for finite positive barcode realizations,
transported to finite-constructible modules by the barcode realization isomorphism. The
finite-constructible isometry constructs the
opposite cost-bounded matching and proves extended-distance equality and
finite-parameter witness equivalence. Its field, critical-fiber finiteness,
zero-left and half-open assumptions restrict that theorem's domain; no such
decomposition or isometry hypothesis is an input to the general distance API.