Definitions for Linear programs for entanglement and key distribution in the quantum internet
DefinitionQAlgorithms_Papers_Independent_Intakethird100_P35The objects the formalized statements of Linear programs for entanglement and key distribution in the quantum internet (arXiv:1809.03120) are stated in. Each was checked against the paper by a blind read-back and a moderator.
EdgeGraph: PDF pp.11,17: finite labelled undirected edges, with arbitrary endpoint ordering. Parallel edges are needed for the rounded multigraph. IsSimple is imposed on G'.IsSimple: PDF p.17: G' has one edge per unordered adjacent pair.Flow: PDF pp.11--12: two nonnegative oriented flows per physical undirected edge.netSourceOutflow: PDF p.12, (9): net outgoing flow, counting each labelled edge once.SingleFeasible: PDF p.12, (10): the full feasible single-pair LP, including nonnegativity.singlePairFlowValue: PDF p.12, (10): optimum of the actual flow LP. On the theorem domain the feasible set contains zero, is compact, and the objective is bounded; the supremum is an attained maximum, including at c=0.ConcurrentFeasible: PDF pp.13--14, (18),(20): every commodity and both orientations share c(e).totalValue: PDF p.13, (18), and p.24, (91)--(93): maximum SUM of net source flows.worstValue: PDF p.14, (20), and p.23, (83)--(86): one jointly feasible flow family, with a common slack value bounded by every commodity's net source flow.SimpleEdgePath: PDF p.19, (54): ALL simple directed paths in the undirected graph. The length is bounded by n-1, hence this is a genuinely finite, computed type. Edge labels and vertex order are retained; no free list of paths is supplied.pathCount: PDF pp.20,26--27: finite cardinality of the complete path type.copyGraph: PDF pp.15,17: replace each edge by L(e) individually labelled unit copies.Packing: PDF pp.20,26--28: a SINGLE concurrent packing in the physical multigraph. The disjointness condition ranges across commodities as well as within them. Each path carries actual copy labels, not just an aggregate edge-load bound.roundedCopies: PDF pp.20,26--27: nonnegative real capacities are floored AFTER scaling.maxPathCount: PDF p.26: Lemma 2 uses the maximum, allowing every path count to be zero.sumPathCount: PDF p.27: Lemma 3 uses the SUM, in contrast to Lemma 2.TerminalPair: PDF p.15: one representative per UNORDERED pair of distinct terminals.ConnectivityFeasible: PDF pp.15,30, (32)--(36),(146)--(150): independent full edge budgets for each connectivity test, with a common lower slack. These tests are not concurrent commodities and their loads are NOT summed over terminal pairs.connectivityValue: PDF pp.15,30, (32),(146): the connectivity LP's actual optimized slack.cutCapacity: PDF p.12, (13): cut sum, each undirected edge counted once.SteinerCut: PDF p.15, (29): the finite nonempty collection of cuts separating S.steinerValue: PDF pp.15,30, (29),(145): minimum of computed Steiner cut sums. For |S|>=2 the domain is finite nonempty, so no totalized empty infimum is used.LPRow: PDF p.16: a stored linear constraint, in equality or <= form.FiniteLP: PDF p.16: an LP stores its actual coefficient rows and linear objective.coefficientRow: Store a linear expression by evaluating it on coordinate unit vectors. All callers below are explicitly homogeneous linear combinations.indexedRows: Enumerate one row for each element of a computed finite index type.LPVariable: Common coordinates: oriented commodity flows, directed usage frequencies, and one slack. For the single and total programs the slack is fixed at zero.lpFlow: Read an oriented flow coordinate from the common LP vector.lpFrequency: Read a directed-channel usage frequency.lpSlack: Read the common slack coordinate.lpCapacity: PDF p.12, (11): sum directed weighted frequencies with the same undirected edge. D labels actual orientations; missing orientations contribute no summand.optimizedLP: PDF pp.12--16, (12),(19),(21),(37): complete explicit constraint arrays. independent=true uses a full capacity copy for every pair, as (34) requires. Otherwise all commodities share the same physical edge budget. Endpoint conservation rows are 0=0; fixing the unused slack to zero in the single/total programs adds only a redundant coordinate. Both choices preserve exactly the source's feasible flows and objective values.descriptionSize: Dense coefficient storage: one scalar per matrix entry, right-hand-side entry, and objective entry. No bit complexity or exact-real solver is asserted.
import Mathlib
/-!
Bauml--Azuma--Kato--Elkouss, arXiv:1809.03120v3.
Standalone graph statements, PDF pp.15--16,20,26--28,30.
Operational network statements and source defects are deferred individually.
All new definitions are paper-local. No operational capacity is defined by a flow.
Compilation is pending the batch mechanical handoff.
-/
noncomputable section
namespace QAlgorithms.Papers.Independent.Intakethird100.P35
open scoped BigOperators
attribute [local instance] Classical.propDecidable Classical.decEq
/-- PDF pp.11,17: finite labelled undirected edges, with arbitrary endpoint ordering.
Parallel edges are needed for the rounded multigraph. IsSimple is imposed on G'. -/
structure EdgeGraph (n : ℕ) (E : Type) where
left : E → Fin n
right : E → Fin n
separated : ∀ e, left e ≠ right e
/-- PDF p.17: G' has one edge per unordered adjacent pair. -/
def IsSimple {n : ℕ} {E : Type} (G : EdgeGraph n E) : Prop :=
∀ e f, ((G.left e = G.left f ∧ G.right e = G.right f) ∨
(G.left e = G.right f ∧ G.right e = G.left f)) → e = f
/-- PDF pp.11--12: two nonnegative oriented flows per physical undirected edge. -/
abbrev Flow (E : Type) := E → Bool → ℝ
/-- PDF p.12, (9): net outgoing flow, counting each labelled edge once. -/
def netSourceOutflow {n : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (f : Flow E) (v : Fin n) : ℝ :=
∑ e, ((if G.left e = v then f e false - f e true else 0) +
(if G.right e = v then f e true - f e false else 0))
/-- PDF p.12, (10): the full feasible single-pair LP, including nonnegativity. -/
def SingleFeasible {n : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (s t : Fin n) (f : Flow E) : Prop :=
(∀ e b, 0 ≤ f e b) ∧ (∀ e, f e false + f e true ≤ c e) ∧
∀ v, v ≠ s → v ≠ t → netSourceOutflow G f v = 0
/-- PDF p.12, (10): optimum of the actual flow LP.
On the theorem domain the feasible set contains zero, is compact, and the
objective is bounded; the supremum is an attained maximum, including at c=0. -/
def singlePairFlowValue {n : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (s t : Fin n) : ℝ :=
sSup {z | ∃ f, SingleFeasible G c s t f ∧ z = netSourceOutflow G f s}
/-- PDF pp.13--14, (18),(20): every commodity and both orientations share c(e). -/
def ConcurrentFeasible {n r : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (s t : Fin r → Fin n)
(f : Fin r → Flow E) : Prop :=
(∀ i e b, 0 ≤ f i e b) ∧
(∀ e, ∑ i, (f i e false + f i e true) ≤ c e) ∧
∀ i v, v ≠ s i → v ≠ t i → netSourceOutflow G (f i) v = 0
/-- PDF p.13, (18), and p.24, (91)--(93): maximum SUM of net source flows. -/
def totalValue {n r : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (s t : Fin r → Fin n) : ℝ :=
sSup {z | ∃ f, ConcurrentFeasible G c s t f ∧
z = ∑ i, netSourceOutflow G (f i) (s i)}
/-- PDF p.14, (20), and p.23, (83)--(86): one jointly feasible flow family,
with a common slack value bounded by every commodity's net source flow. -/
def worstValue {n r : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (s t : Fin r → Fin n) : ℝ :=
sSup {z | ∃ f, ConcurrentFeasible G c s t f ∧
∀ i, z ≤ netSourceOutflow G (f i) (s i)}
/-- PDF p.19, (54): ALL simple directed paths in the undirected graph.
The length is bounded by n-1, hence this is a genuinely finite, computed type.
Edge labels and vertex order are retained; no free list of paths is supplied. -/
abbrev SimpleEdgePath {n : ℕ} {E : Type} (G : EdgeGraph n E) (s t : Fin n) :=
Σ l : Fin n,
{p : (Fin (l.val + 1) → Fin n) × (Fin l.val → E) //
Function.Injective p.1 ∧ p.1 0 = s ∧ p.1 (Fin.last l.val) = t ∧
∀ i : Fin l.val,
(G.left (p.2 i) = p.1 i.castSucc ∧ G.right (p.2 i) = p.1 i.succ) ∨
(G.right (p.2 i) = p.1 i.castSucc ∧ G.left (p.2 i) = p.1 i.succ)}
/-- PDF pp.20,26--27: finite cardinality of the complete path type. -/
def pathCount {n : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (s t : Fin n) : ℕ :=
Fintype.card (SimpleEdgePath G s t)
/-- PDF pp.15,17: replace each edge by L(e) individually labelled unit copies. -/
def copyGraph {n : ℕ} {E : Type} (G : EdgeGraph n E) (L : E → ℕ) :
EdgeGraph n (Σ e : E, Fin (L e)) where
left e := G.left e.1
right e := G.right e.1
separated e := G.separated e.1
/-- PDF pp.20,26--28: a SINGLE concurrent packing in the physical multigraph.
The disjointness condition ranges across commodities as well as within them.
Each path carries actual copy labels, not just an aggregate edge-load bound. -/
structure Packing {n r : ℕ} {E : Type} (G : EdgeGraph n E) (L : E → ℕ)
(s t : Fin r → Fin n) where
count : Fin r → ℕ
path : (i : Σ j : Fin r, Fin (count j)) → SimpleEdgePath (copyGraph G L) (s i.1) (t i.1)
disjoint : ∀ i j, i ≠ j → ∀ a : Fin (path i).1.val, ∀ b : Fin (path j).1.val,
(path i).2.val.2 a ≠ (path j).2.val.2 b
/-- PDF pp.20,26--27: nonnegative real capacities are floored AFTER scaling. -/
def roundedCopies {E : Type} (c : E → ℝ) (m k N : ℕ) (e : E) : ℕ :=
⌊((m * k * N : ℕ) : ℝ) * c e⌋₊
/-- PDF p.26: Lemma 2 uses the maximum, allowing every path count to be zero. -/
def maxPathCount {n r : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (s t : Fin r → Fin n) : ℕ :=
Finset.univ.sup (fun i => pathCount G (s i) (t i))
/-- PDF p.27: Lemma 3 uses the SUM, in contrast to Lemma 2. -/
def sumPathCount {n r : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (s t : Fin r → Fin n) : ℕ :=
∑ i, pathCount G (s i) (t i)
/-- PDF p.15: one representative per UNORDERED pair of distinct terminals. -/
abbrev TerminalPair {n : ℕ} (S : Finset (Fin n)) :=
{p : Fin n × Fin n // p.1 ∈ S ∧ p.2 ∈ S ∧ p.1 < p.2}
/-- PDF pp.15,30, (32)--(36),(146)--(150): independent full edge budgets
for each connectivity test, with a common lower slack. These tests are not
concurrent commodities and their loads are NOT summed over terminal pairs. -/
def ConnectivityFeasible {n : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (S : Finset (Fin n))
(z : ℝ) (f : TerminalPair S → Flow E) : Prop :=
∀ p, SingleFeasible G c p.val.1 p.val.2 (f p) ∧
z ≤ netSourceOutflow G (f p) p.val.1
/-- PDF pp.15,30, (32),(146): the connectivity LP's actual optimized slack. -/
def connectivityValue {n : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (S : Finset (Fin n)) : ℝ :=
sSup {z | ∃ f, ConnectivityFeasible G c S z f}
/-- PDF p.12, (13): cut sum, each undirected edge counted once. -/
def cutCapacity {n : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (A : Finset (Fin n)) : ℝ :=
∑ e, if (G.left e ∈ A ∧ G.right e ∉ A) ∨
(G.right e ∈ A ∧ G.left e ∉ A) then c e else 0
/-- PDF p.15, (29): the finite nonempty collection of cuts separating S. -/
def SteinerCut {n : ℕ} (S A : Finset (Fin n)) : Prop :=
∃ s ∈ S, ∃ t ∈ S, s ∈ A ∧ t ∉ A
/-- PDF pp.15,30, (29),(145): minimum of computed Steiner cut sums.
For |S|>=2 the domain is finite nonempty, so no totalized empty infimum is used. -/
def steinerValue {n : ℕ} {E : Type} [Fintype E]
(G : EdgeGraph n E) (c : E → ℝ) (S : Finset (Fin n)) : ℝ :=
sInf {z | ∃ A, SteinerCut S A ∧ z = cutCapacity G c A}
/-- Zero oriented flow has zero net netSourceOutflow, including an empty edge type. -/
example {n : ℕ} {E : Type} [Fintype E] (G : EdgeGraph n E) (v : Fin n) :
netSourceOutflow G (fun _ _ => 0) v = 0 := by
simp [netSourceOutflow]
/-- Zero capacities give zero rounded copies, including the N=0 boundary. -/
example {E : Type} (m k N : ℕ) (e : E) :
roundedCopies (fun _ => 0) m k N e = 0 := by
simp [roundedCopies]
/-- A cut containing every vertex has capacity zero. -/
example {n : ℕ} {E : Type} [Fintype E] (G : EdgeGraph n E) (c : E → ℝ) :
cutCapacity G c Finset.univ = 0 := by
simp [cutCapacity]
/-- PDF p.16: a stored linear constraint, in equality or <= form. -/
structure LPRow (X : Type) where
coefficient : X → ℝ
rhs : ℝ
equality : Bool
/-- PDF p.16: an LP stores its actual coefficient rows and linear objective. -/
structure FiniteLP (X : Type) where
rows : List (LPRow X)
objective : X → ℝ
/-- Store a linear expression by evaluating it on coordinate unit vectors.
All callers below are explicitly homogeneous linear combinations. -/
def coefficientRow {X : Type} (l : (X → ℝ) → ℝ) (rhs : ℝ)
(equality : Bool) : LPRow X :=
⟨fun j => l (Pi.single j 1), rhs, equality⟩
/-- Enumerate one row for each element of a computed finite index type. -/
def indexedRows {I X : Type} [Fintype I] (f : I → LPRow X) : List (LPRow X) :=
Finset.univ.toList.map f
/-- Common coordinates: oriented commodity flows, directed usage frequencies,
and one slack. For the single and total programs the slack is fixed at zero. -/
abbrev LPVariable (I E D : Type) := ((I × E × Bool) ⊕ D) ⊕ Unit
/-- Read an oriented flow coordinate from the common LP vector. -/
def lpFlow {I E D : Type} (x : LPVariable I E D → ℝ) (i : I) : Flow E :=
fun e b => x (Sum.inl (Sum.inl (i, e, b)))
/-- Read a directed-channel usage frequency. -/
def lpFrequency {I E D : Type} (x : LPVariable I E D → ℝ) (d : D) : ℝ :=
x (Sum.inl (Sum.inr d))
/-- Read the common slack coordinate. -/
def lpSlack {I E D : Type} (x : LPVariable I E D → ℝ) : ℝ :=
x (Sum.inr ())
/-- PDF p.12, (11): sum directed weighted frequencies with the same undirected
edge. D labels actual orientations; missing orientations contribute no summand. -/
def lpCapacity {I E D : Type} [Fintype D]
(edgeOf : D → E) (C : D → ℝ) (x : LPVariable I E D → ℝ) (e : E) : ℝ :=
∑ d, if edgeOf d = e then C d * lpFrequency x d else 0
/-- PDF pp.12--16, (12),(19),(21),(37): complete explicit constraint arrays.
independent=true uses a full capacity copy for every pair, as (34) requires.
Otherwise all commodities share the same physical edge budget.
Endpoint conservation rows are 0=0; fixing the unused slack to zero in the
single/total programs adds only a redundant coordinate. Both choices preserve
exactly the source's feasible flows and objective values. -/
def optimizedLP {n : ℕ} {I E D : Type} [Fintype I] [Fintype E] [Fintype D]
(G : EdgeGraph n E) (s t : I → Fin n) (edgeOf : D → E) (C : D → ℝ)
(independent hasSlack : Bool) : FiniteLP (LPVariable I E D) where
rows :=
indexedRows (fun j : I × E × Bool => coefficientRow
(fun x => -lpFlow x j.1 j.2.1 j.2.2) 0 false) ++
indexedRows (fun d : D => coefficientRow (fun x => -lpFrequency x d) 0 false) ++
indexedRows (fun d : D => coefficientRow (fun x => lpFrequency x d) 1 false) ++
[coefficientRow (fun x => ∑ d, lpFrequency x d) 1 true] ++
indexedRows (fun j : I × Fin n => coefficientRow
(fun x => if j.2 ≠ s j.1 ∧ j.2 ≠ t j.1 then
netSourceOutflow G (lpFlow x j.1) j.2 else 0) 0 true) ++
(if independent then
indexedRows (fun j : I × E => coefficientRow
(fun x => lpFlow x j.1 j.2 false + lpFlow x j.1 j.2 true -
lpCapacity edgeOf C x j.2) 0 false)
else
indexedRows (fun e : E => coefficientRow
(fun x => (∑ i, (lpFlow x i e false + lpFlow x i e true)) -
lpCapacity edgeOf C x e) 0 false)) ++
(if hasSlack then
indexedRows (fun i : I => coefficientRow
(fun x => lpSlack x - netSourceOutflow G (lpFlow x i) (s i)) 0 false)
else [coefficientRow (fun x => lpSlack x) 0 true])
objective := fun j =>
let x := Pi.single j 1
if hasSlack then lpSlack x else ∑ i, netSourceOutflow G (lpFlow x i) (s i)
/-- Dense coefficient storage: one scalar per matrix entry, right-hand-side
entry, and objective entry. No bit complexity or exact-real solver is asserted. -/
def descriptionSize {X : Type} [Fintype X] (P : FiniteLP X) : ℕ :=
Fintype.card X * (P.rows.length + 1) + P.rows.length
/-- Extracting coefficients retains a one-coordinate homogeneous expression. -/
example (a : ℝ) (j : Fin 1) :
(coefficientRow (fun x : Fin 1 → ℝ => a * x j) 0 false).coefficient j = a := by
simp [coefficientRow]
end QAlgorithms.Papers.Independent.Intakethird100.P35
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intakethird100.P35.ConcurrentFeasible
For any natural numbers , any type equipped with a finite enumeration, any graph with distinct endpoints , any capacity function , any functions , and any family of real functions , write and . This predicate requires
There are no distinctness requirements on terminals within or between pairs, and no sign requirements on terminal net outflows. Any negative edge capacity makes feasibility impossible. When , the predicate reduces to for every edge. Empty edge sets are allowed; when , the terminal functions can exist only if , and the graph also forces to be empty.
QAlgorithms.Papers.Independent.Intakethird100.P35.ConnectivityFeasible
For a natural number , a type equipped with a finite enumeration, a graph with distinct endpoints for each edge, any real capacity function , a finite terminal set , a real number , and a family of real-valued functions indexed by with , feasibility means that every such pair satisfies all of the following: for every edge and both direction indices; for every edge; at every vertex different from both and ; and , where . Each pair has its own full capacity bound; capacities are not summed across pairs. There is no assumption that or is nonnegative. If has fewer than two elements, the condition is vacuous for every real . If there is at least one terminal pair and some edge has negative capacity, the required nonnegative flow values cannot satisfy that edge’s capacity bound.
QAlgorithms.Papers.Independent.Intakethird100.P35.EdgeGraph
For any natural number , including , and any type , an element of this structure consists of two functions , together with the requirement that for every . Thus each edge label has two distinct, ordered endpoints. The type need not be finite, and distinct edge labels may have the same endpoints. If , such a structure can exist only when is empty.
QAlgorithms.Papers.Independent.Intakethird100.P35.FiniteLP
For any type , a consists of a finite ordered list of rows, each row containing a coefficient function , a real right-hand side, and a Boolean equality flag, together with an objective coefficient function . The row list may be empty or contain repeated rows; itself need not be finite or nonempty. This structure supplies no definition of feasibility, optimization direction, or attained optimum.
QAlgorithms.Papers.Independent.Intakethird100.P35.Flow
For any type , a flow is simply a function , assigning two real numbers to each edge label. There are no nonnegativity, capacity, or conservation conditions in this definition. If is empty, there is exactly one such function.
QAlgorithms.Papers.Independent.Intakethird100.P35.IsSimple
For any natural number , any type , and any graph specified by endpoint functions satisfying , this predicate means that for all ,
In other words, two edge labels with the same endpoints, in either order, must be equal. No finiteness assumption is imposed on ; when is empty, the condition holds vacuously.
QAlgorithms.Papers.Independent.Intakethird100.P35.LPRow
For any type , an consists of a function called its coefficient function, a real number called its right-hand side, and a Boolean value called its equality flag. The type need not be finite or nonempty, and no restrictions on the coefficients or right-hand side, or interpretation of the Boolean flag as a constraint, are included in this structure.
QAlgorithms.Papers.Independent.Intakethird100.P35.LPVariable
For arbitrary types , this abbreviation denotes the disjoint union
where represent the Boolean values false and true. Thus its elements have exactly three distinct tagged forms: a triple , an element , or the single additional element ; the tags keep these forms distinct even if the underlying types overlap. No finiteness or nonemptiness assumptions are imposed on , and the additional element is always present.
QAlgorithms.Papers.Independent.Intakethird100.P35.Packing
For natural numbers , an arbitrary edge type , a graph assigning each edge distinct endpoints , a function , and terminal maps , a packing consists of a natural number for each terminal index and a path for each indexed occurrence with . The available edges are the labeled copies with and ; every copy has endpoints . Each selected path has a length with , an injective vertex sequence with and , and a sequence of copied edges, each joining its consecutive vertices in either orientation. For any two distinct indexed occurrences, every copied edge used by one path must differ from every copied edge used by the other, including when both paths belong to the same terminal index. Vertices may be shared between paths, and different copies of the same original edge are distinct edges. Counts may all be zero. A path of length zero is permitted exactly when its terminals coincide; such paths use no edges, so the disjointness requirement does not restrict how many are selected. If , there are no counts or selected paths; if , the terminal maps can exist only when .
QAlgorithms.Papers.Independent.Intakethird100.P35.SimpleEdgePath
For any natural number , any type , any graph with distinct endpoints , and any vertices , this type consists of the following data: a natural number , a vertex sequence , and an edge-label sequence , such that all are pairwise distinct, , , and, for each ,
Thus traversal may use either order of an edge’s endpoints, and the chosen edge labels are part of the data. No finiteness assumption is made on . Length is allowed: it gives the single-vertex path exactly when ; injectivity excludes all positive-length paths when . Supplying requires .
QAlgorithms.Papers.Independent.Intakethird100.P35.SingleFeasible
For any natural number , any type equipped with a finite enumeration, any graph with distinct endpoints for every , any real capacity function , any vertices , and any function , write and . This predicate requires all three conditions:
The vertices are not required to be distinct, and no sign condition is imposed on their net outflows. A negative capacity on any edge makes the predicate impossible to satisfy. Empty edge sets are allowed, with every displayed sum equal to ; supplying requires .
QAlgorithms.Papers.Independent.Intakethird100.P35.SteinerCut
For any natural number and finite subsets , the stated property means that there exist such that and . Equivalently, contains at least one terminal and excludes at least one terminal. The two witnesses are necessarily distinct, but no order between them is required, and no restriction is placed on the membership of vertices outside . The property is false when has fewer than two elements, when is empty, or when is the whole vertex set; in particular, it is always false when .
QAlgorithms.Papers.Independent.Intakethird100.P35.TerminalPair
For any natural number and finite subset of , this is the type of ordered pairs such that , , and in the usual order on vertex indices. Thus each pair consists of two distinct terminals, recorded with the smaller one first. The type is empty when has fewer than two elements, including when .
QAlgorithms.Papers.Independent.Intakethird100.P35.coefficientRow
For any type , any function , any real number , and any Boolean , this definition produces a row with right-hand side , equality flag , and coefficient at equal to , where is at and at every other element. No finiteness or nonemptiness assumption is made on , and no linearity assumption is made on : the definition only evaluates on these individual coordinate functions.
QAlgorithms.Papers.Independent.Intakethird100.P35.connectivityValue
For a natural number , a type equipped with a finite enumeration, a graph assigning each edge distinct endpoints , any function , and a finite terminal set , the defined real number is . Each assigns a nonnegative real number to every edge and each of two direction indices, satisfies separately for every edge, has whenever , and has , where . Different terminal pairs do not share their capacity bounds. This uses the total real supremum operation, which returns for an empty set or a set unbounded above. In particular, when , every real qualifies vacuously and the defined value is ; when and some capacity is negative, no qualifies and the value is also .
QAlgorithms.Papers.Independent.Intakethird100.P35.copyGraph
For any natural number , any type , any graph with endpoint functions satisfying , and any function , the defined graph has the same vertex set and edge-label type
The left and right endpoints of are respectively and , and their inequality is inherited from . An edge with contributes no labels, while an edge with positive contributes that many distinct labels sharing its endpoints. Neither nor the resulting edge type is required to be finite. If , the supplied graph forces , and hence the resulting edge type, to be empty.
QAlgorithms.Papers.Independent.Intakethird100.P35.cutCapacity
For a natural number , a type equipped with a finite enumeration, a graph assigning each edge distinct endpoints , any real-valued function , and a finite subset , the cut capacity is : each edge contributes its capacity exactly when one endpoint belongs to and the other does not, and otherwise contributes zero. The edge’s orientation does not affect this condition, and distinct parallel edge labels are counted separately. Capacities need not be nonnegative, so the sum can be negative. It is when is empty, when is empty, or when . If , the existence of the endpoint maps forces to be empty.
QAlgorithms.Papers.Independent.Intakethird100.P35.descriptionSize
For any finite type , equipped with a finite enumeration, and any finite linear-program description consisting of a list of rows and an objective function , define its description size to be
where is the length of its row list. Each row consists of a coefficient function , a real right-hand side, and a Boolean equality flag. The formula counts every listed row, including repeated or zero rows, and applies also when or the row list is empty; it does not depend on the values of the coefficients, right-hand sides, equality flags, or objective.
QAlgorithms.Papers.Independent.Intakethird100.P35.indexedRows
For any types , with a specified finite enumeration of , and any function assigning to each a row consisting of coefficients , a real right-hand side, and a Boolean equality flag, this definition returns the list obtained by listing every element of once and applying in that enumeration order. Its length is ; it is empty when is empty, and equal rows can appear repeatedly when distinct indices have the same image. No finiteness assumption is made on .
QAlgorithms.Papers.Independent.Intakethird100.P35.lpCapacity
For arbitrary types , with a specified finite enumeration of , a function , real values , a real assignment on , and an element , this definition returns
where is the tagged -coordinate. Neither nor is required to be nonnegative, need not be injective or surjective, and need not be finite. The value is zero if is empty or no maps to .
QAlgorithms.Papers.Independent.Intakethird100.P35.lpFlow
For arbitrary types , a real assignment on the tagged disjoint union , and an element , this definition returns the function given by , using the tagged triple coordinate of . There are no sign, capacity, or conservation requirements on this function and no finiteness assumptions on the types; when is empty, the returned function has empty domain.
QAlgorithms.Papers.Independent.Intakethird100.P35.lpFrequency
For arbitrary types , a real assignment on , and an element , this definition returns at the tagged -coordinate. It imposes no nonnegativity, upper bound, or normalization requirement, and the types need not be finite.
QAlgorithms.Papers.Independent.Intakethird100.P35.lpSlack
For arbitrary types and a real assignment on , this definition returns the coordinate at the single additional element. This is an unrestricted real number; no finiteness or nonemptiness assumptions on are required.
QAlgorithms.Papers.Independent.Intakethird100.P35.maxPathCount
For natural numbers , a type equipped with a finite enumeration of all its elements, a graph assigning each edge distinct endpoints in , and terminal maps , let be the number of the following paths from to : choose a length with , an injective vertex sequence beginning at and ending at , and an edge sequence such that each joins and in either orientation. Different edge labels give different paths even when their endpoints agree. The defined value is , with value when . A disconnected pair has count , while coincident terminals have exactly the length-zero path. No simplicity assumption on is imposed. The case is included whenever the terminal maps exist, which requires .
QAlgorithms.Papers.Independent.Intakethird100.P35.netSourceOutflow
For any natural number , any type equipped with a finite enumeration, any graph with endpoint functions satisfying , any function , and any vertex , write and . The defined real number is
where each indicator is when its condition holds and otherwise. The values of may be arbitrary real numbers. If is empty, the sum is ; if , there is no vertex to supply.
QAlgorithms.Papers.Independent.Intakethird100.P35.optimizedLP
For any natural number , types with specified finite enumerations, a graph whose edges have distinct endpoints , functions , a function , real values , and Booleans corresponding respectively to independent and hasSlack, this definition constructs a row list and an objective coefficient function on
For any assignment , write , , , and define
For a real-valued function of assignments, let denote the stored row with coefficient at coordinate , right-hand side , and Boolean equality flag , where is at and elsewhere. The row list concatenates the following blocks in exactly this order, enumerating every index once within each block: for every ; for every ; for every ; the single row ; for every , where if and , and otherwise; then, if is true, for every , or, if is false, for every ; finally, if is true, for every , or, if is false, the single row . Its objective coefficient at is when is true and when is false. These are stored coefficients and flags; the definition itself specifies no feasibility relation or optimization direction. There is no simplicity assumption on , no requirement that , and no sign requirement on . Empty index types are allowed whenever the supplied functions exist: empty indexed blocks disappear and empty sums are zero; in particular, if is empty, the normalization block remains a row with every coefficient zero, right-hand side , and equality flag true.
QAlgorithms.Papers.Independent.Intakethird100.P35.pathCount
For any natural number , any type equipped with a finite enumeration, any graph with distinct endpoints , and any vertices , the defined natural number is the cardinality of the finite collection of all data consisting of a length , pairwise distinct vertices with and , and edge labels such that each has endpoints in either order. Different choices of edge labels count separately even when their endpoint sequences agree. Length is included, so the count is when ; when is empty and , it is . Supplying the terminal vertices excludes .
QAlgorithms.Papers.Independent.Intakethird100.P35.roundedCopies
For any type , any function , natural numbers , and edge , the number of rounded copies is , where the natural-number product is converted to a real number before multiplication by , and is the greatest natural number at most when , and is when . No finiteness assumption on or nonnegativity assumption on is imposed. In particular, the result is if any of is zero, or if .
QAlgorithms.Papers.Independent.Intakethird100.P35.singlePairFlowValue
For any natural number , any type equipped with a finite enumeration, any graph with distinct endpoints , any function , and any vertices , define, for a function ,
The defined value is the real supremum of the set of numbers obtained from functions satisfying for every edge and Boolean , for every edge, and whenever and . The vertices may coincide. Capacities need not be nonnegative; if any capacity is negative, the set is empty, whose real supremum here is . If is empty, the value is . Supplying excludes .
QAlgorithms.Papers.Independent.Intakethird100.P35.steinerValue
For a natural number , a type equipped with a finite enumeration, a graph assigning each edge distinct endpoints , any real-valued capacity function , and a finite terminal set , the defined value is the real infimum of all numbers as ranges over subsets of for which there exist with and . Thus, when , it is the minimum of this finite, nonempty collection of cut sums. Every crossing edge label is counted separately, and capacities may be negative. When , there are no qualifying subsets, and the total real infimum of the empty set is ; this includes .
QAlgorithms.Papers.Independent.Intakethird100.P35.sumPathCount
For natural numbers , a type equipped with a finite enumeration of all its elements, a graph assigning each edge distinct endpoints in , and terminal maps , the defined value is . Here counts all choices of a length with , an injective vertex sequence with endpoints , and an edge sequence in which each edge joins the corresponding consecutive vertices in either orientation. Paths using different edge labels are counted separately even if those edges have identical endpoints. A disconnected pair contributes , and coincident terminals contribute the single length-zero path. No simplicity assumption is imposed, and repeated terminal pairs at different indices are counted repeatedly. If , the sum is ; is allowed when the terminal maps exist, necessarily with .
QAlgorithms.Papers.Independent.Intakethird100.P35.totalValue
For any natural numbers , any type equipped with a finite enumeration, any graph with distinct endpoints , any function , and any terminal functions , define
The defined value is the real supremum of all numbers arising from families such that every , every edge satisfies , and whenever and . Terminal vertices may coincide, and their net outflows need not be nonnegative. Negative edge capacities make the set empty, whose real supremum here is . The value is also when or is empty. If , the supplied graph and terminal functions require to be empty and .
QAlgorithms.Papers.Independent.Intakethird100.P35.worstValue
For any natural numbers , any type equipped with a finite enumeration, any graph with distinct endpoints , any function , and any terminal functions , define
The defined value is the real supremum of the set of for which there exists a family satisfying for every , for every edge, whenever and , and for every . Terminals may coincide, and no nonnegativity condition is imposed on . Any negative edge capacity makes this set empty. When and all capacities are nonnegative, the conditions on are vacuous, so the set is all of ; the real supremum operation used here returns for both empty sets and sets unbounded above. Consequently the value is when , and it is also when is empty. If , the supplied graph and terminal functions require to be empty and .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.