Related-pair counts between finsets #
Facts about Mathlib's Rel.interedges and Rel.edgeDensity used when comparing edge densities
across a refinement of finite partitions: the edge count between two finsets is their size product
times their edge density (with no nonemptiness hypothesis, since both sides vanish on an empty
finset), edge counts are additive over disjoint unions on either side, and the edge count between
two finsets splits along the traces of the parts of finite partitions on them. The corresponding
SimpleGraph results are specializations to the adjacency relation. Edge densities are invariant
under relabelling the vertices along an equivalence (SimpleGraph.edgeDensity_comap_symm).
For graphs, SimpleGraph.patternDensity G e s t is the edge density of (s, t) if e holds and
the nonedge density 1 - d(s, t) otherwise: the density factor of a pair in the predicted count
of an induced pattern. It lies in [0, 1] and changes by exactly as much as the edge density.
The number of related pairs between two finsets is their size product times their density. This holds without nonemptiness hypotheses: if either finset is empty, both sides vanish.
The real-valued form of Rel.card_mul_card_mul_edgeDensity.
Related-pair counts are additive over a pairwise disjoint union on the left.
Related-pair counts are additive over a pairwise disjoint union on the right.
The number of related pairs between A ⊆ s and B ⊆ t splits along the traces on A and on
B of the parts of finite partitions of s and of t.
The related-pair count between two coarse parts is the sum of the counts between the fine parts with those coarse parents.
The real-valued form of Rel.sum_sum_card_interedges_fiber.
The number of edges between two finsets is their size product times their edge density. This holds without nonemptiness hypotheses: if either finset is empty, both sides vanish.
The real-valued form of SimpleGraph.card_mul_card_mul_edgeDensity.
Edge densities are invariant under relabelling. Relabelling the vertices along e, the
graph as G.comap e.symm and both finsets by mapping along e, leaves the edge density unchanged.
The edge density of (s, t) if e holds, and its nonedge density 1 - d(s, t) otherwise.
This is the density factor of a pair in the predicted count of an induced pattern, where e
records whether the pattern has an edge there.
Instances For
Where the pattern has an edge, its density factor is the edge density.
Where the pattern has no edge, its density factor is the nonedge density.
An edge or nonedge density is nonnegative.
An edge or nonedge density is at most one.
An edge or nonedge density changes by exactly as much as the edge density.
Edge counts are additive over a pairwise disjoint union on the left.
Edge counts are additive over a pairwise disjoint union on the right.
The number of edges between A ⊆ s and B ⊆ t splits along the traces on A and on B of
the parts of finite partitions of s and of t.
The edge count between two coarse parts is the sum of the edge counts between the fine parts with those coarse parents.
The real-valued form of SimpleGraph.sum_sum_card_interedges_fiber.