Catenae #
Formalizes the catena (Osborne, Putnam & Groß 2012, Syntax 15:4, 354–396): a connected subgraph of a dependency tree — any word or combination of words that is continuous with respect to the dominance relation. Catenae strictly generalize constituents: every constituent is a catena, but not every catena is a constituent.
Main declarations #
bfsReachable— BFS within a restricted node set; the computable core of catena-membership checking.isConnected,isCatena,isConstituent— Bool-valued predicates over a node list and a dependency list.BidirReachable— Prop-level bidirectional reachability matchingbfsReachable, withbidir_symm/bidir_trans.bfsReachable_complete— everyBidirReachablenode appears in the BFS output. Used by downstream files to convert structural reachability proofs into computable catena membership.singleton_isCatena— singletons are catenae.
Implementation notes #
- Predicate-shape definitions return
Boolto integrate with downstreamdecide-style theorems; a substrate-wide migration toProp+[DecidablePred]is deferred. - The original
IsCatenamathlib-Prop bridge (viaSimpleGraph.Preconnectedon induced subgraphs) and the worked numerical examples (tree9,tree22,chain4,star4, counting / ratio API) were removed during the mathlib-quality pass; they had no external consumers.
Computable BFS over dependency edges #
Check if a node set is connected within the dependency graph. BFS from the first node and check that all others are reached.
Equations
- DepGrammar.Catena.isConnected deps [] = true
- DepGrammar.Catena.isConnected deps (start :: tail) = (start :: tail).all (DepGrammar.Catena.bfsReachable✝ deps (start :: tail) start).contains
Instances For
Computable catena check: non-empty and connected in the tree.
Equations
- DepGrammar.Catena.isCatena deps nodes = (!nodes.isEmpty && DepGrammar.Catena.isConnected deps nodes)
Instances For
Check if a node set equals the complete subtree (projection) rooted at some node.
Equations
- One or more equations did not get rendered due to their size.
Instances For
BFS invariants #
Bidirectional reachability (Prop level) #
Bidirectional reachability within a restricted node set.
BidirReachable deps allowed u v holds when there is a path from u to v
using dependency edges (in either direction) where all nodes are in allowed.
- here {deps : List Dependency} {allowed : List ℕ} (v : ℕ) : v ∈ allowed → BidirReachable deps allowed v v
- step {deps : List Dependency} {allowed : List ℕ} (u v w : ℕ) : u ∈ allowed → v ∈ allowed → (∃ d ∈ deps, d.headIdx = u ∧ d.depIdx = v ∨ d.depIdx = u ∧ d.headIdx = v) → BidirReachable deps allowed v w → BidirReachable deps allowed u w
Instances For
Append a step to the end of a bidirectional path.
Bidirectional reachability is symmetric.
Bidirectional reachability is transitive.
BFS completeness #
BFS completeness: every bidirectionally reachable node appears in the
bfsReachable output.
Any singleton is a catena: non-empty and trivially connected.