OAI/NumberTheory/TwoPoint/Bounds/LabeledForest.lean
18 declarations, 0 contain sorry, 0 declared as axioms
Labeled ordered forests
Binary trees use the first-child / next-sibling convention. The labels are auxiliary: erasing them keeps the finite shape used by the code.
- def
OAI.TwoPointCorrelations.forestNodesline 20 - def
OAI.TwoPointCorrelations.forestRootsline 24 - def
OAI.TwoPointCorrelations.forestAdjacentline 28 - lemma
OAI.TwoPointCorrelations.forestNodes_lengthline 34 - lemma
OAI.TwoPointCorrelations.forestRoots_subsetline 39 - lemma
OAI.TwoPointCorrelations.forestAdjacent_symmline 49 - lemma
OAI.TwoPointCorrelations.forestAdjacent_memline 55 - lemma
OAI.TwoPointCorrelations.forestAdjacent_irreflline 68 - def
OAI.TwoPointCorrelations.attachForestLeafline 83Source documentation
Add a fresh leaf as the first child of its unique parent.
def attachForestLeaf [DecidableEq V] (parent leaf : V) : BinaryTree V → BinaryTree V | .nil => .nil | .node v children siblings => if v = parent then .node v (.node leaf .nil children) siblings else .node v (attachForestLeaf parent leaf children) (attachForestLeaf parent leaf siblings) - lemma
OAI.TwoPointCorrelations.attachForestLeaf_of_not_memline 89 - lemma
OAI.TwoPointCorrelations.attachForestLeaf_rootsline 99 - lemma
OAI.TwoPointCorrelations.attachForestLeaf_nodes_permline 106 - lemma
OAI.TwoPointCorrelations.move_two_disjunctsline 136 - lemma
OAI.TwoPointCorrelations.attachForestLeaf_adjacentline 140 - lemma
OAI.TwoPointCorrelations.attachForestLeaf_nodupline 184 - lemma
OAI.TwoPointCorrelations.forestNodes_mapline 190 - lemma
OAI.TwoPointCorrelations.forestRoots_mapline 194 - lemma
OAI.TwoPointCorrelations.forestAdjacent_mapline 198