Binary branch decompositions of finite sets
Lax183560.BranchDecompositions · concepts/Lax183560/BranchDecompositions.lean · lax-183560
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A branch decomposition of a finite set is an unrooted tree of maximum degree three whose leaves are in bijection with the set. Each edge determines a cut by separating the leaves into two parts.
For symmetric cut functions, a decomposition can be represented by a binary tree obtained by rooting it at an edge. Each subtree determines one side of a cut. The root determines the cut with an empty opposite side, which has value zero for the cut functions used here.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Combinatorics.SimpleGraph.Finite |
| 2 | import Mathlib.LinearAlgebra.Matrix.Rank |
| 3 | import Mathlib.Data.ZMod.Basic |
| 4 | import Mathlib.Order.Lattice.Nat |
| 5 | |
| 6 | /-! |
| 7 | --- |
| 8 | title: Binary branch decompositions of finite sets |
| 9 | type: definition |
| 10 | --- |
| 11 | A branch decomposition of a finite set is an unrooted tree of maximum degree |
| 12 | three whose leaves are in bijection with the set. Each edge determines a cut |
| 13 | by separating the leaves into two parts. |
| 14 | |
| 15 | For symmetric cut functions, a decomposition can be represented by a binary |
| 16 | tree obtained by rooting it at an edge. Each subtree determines one side of |
| 17 | a cut. The root determines the cut with an empty opposite side, which has |
| 18 | value zero for the cut functions used here. |
| 19 | -/ |
| 20 | |
| 21 | namespace Lax183560.BranchDecompositions |
| 22 | |
| 23 | inductive BinaryTree (α : Type) where |
| 24 | | leaf : α → BinaryTree α |
| 25 | | fork : BinaryTree α → BinaryTree α → BinaryTree α |
| 26 | |
| 27 | /-- Leaves with multiplicity, in left-to-right order. -/ |
| 28 | def BinaryTree.leaves {α : Type} : BinaryTree α → List α |
| 29 | | .leaf a => [a] |
| 30 | | .fork left right => left.leaves ++ right.leaves |
| 31 | |
| 32 | /-- A valid branch tree contains each element of the ground set once. -/ |
| 33 | def BinaryTree.Valid {α : Type} [DecidableEq α] |
| 34 | (t : BinaryTree α) (ground : Finset α) : Prop := |
| 35 | t.leaves.Nodup ∧ t.leaves.toFinset = ground |
| 36 | |
| 37 | /-- Maximum cut value among the cuts at the nodes of a branch tree. -/ |
| 38 | def BinaryTree.cutWidth {α : Type} [DecidableEq α] |
| 39 | (measure : Finset α → ℕ) : BinaryTree α → ℕ |
| 40 | | .leaf a => measure {a} |
| 41 | | .fork left right => |
| 42 | max (measure ((left.leaves ++ right.leaves).toFinset)) |
| 43 | (max (left.cutWidth measure) (right.cutWidth measure)) |
| 44 | |
| 45 | end Lax183560.BranchDecompositions |
| 46 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments