Theory KD_Region_Tree
section ‹K-dimensional Region Trees›
theory KD_Region_Tree
imports
"HOL-Library.NList"
"HOL-Library.Tree"
begin
lemma nlists_Suc: "nlists (Suc n) A = (⋃a∈A. (#) a ` nlists n A)"
by(auto simp: set_eq_iff image_iff in_nlists_Suc_iff)
lemma in_nlists_UNIV: "xs ∈ nlists k UNIV ⟷ length xs = k"
unfolding nlists_def by(auto)
lemma nlists_singleton: "nlists n {a} = {replicate n a}"
unfolding nlists_def by(auto simp: replicate_length_same dest!: subset_singletonD)
text ‹Generalizes quadtrees. Instead of having ‹2^n› direct children of a node,
the children are arranged in a binary tree where each ‹Split› splits along one dimension.›