A successful child-local test is a terminal hit of the root router
ProvedOAI.Problem310.FiniteLocalHit.local_test_implies_root_hitSetting. Fix . The children of a vertex are labelled : child is the default child, and are the nondefault children, ordered as integers. A node is a finite sequence of children (the path from the root) of length , and a leaf is a sequence of children of length exactly ; denotes followed by the child . Bits are written (false) and (true). For and let
be the index of the cell containing in the -periodic grid of mesh .
Let be a resolution for every node and nondefault child , and one for every leaf . A selector table assigns a bit to every node , nondefault child and cell index ; a terminal table assigns a bit to every leaf and . The selector value of at a sequence and a point is if , and otherwise. The first-success choice is the smallest nondefault with , and the default child if there is none. Routing appends the chosen child repeatedly: and ; write for the route from the root, so that is the leaf reached by the router at .
Theorem. Let , let be a node, a nondefault child and , with . Assume:
- , and for every (the route of reaches without taking a default child);
- for every and every nondefault child one has (along the route of , the selectors up to and including the chosen one take the same values at );
- (the route of takes the default child at );
- for every nondefault ;
- the local test of child succeeds at : and , where is the leaf reached by routing at from the child .
Then the terminal lookup of the root router at succeeds:
In the random construction of the avoiding set, a point belongs to the random set exactly when the terminal lookup of the root router at succeeds. The lemma converts a success of a child-local test, which only involves the selector of child at and the subtree below , into membership of in that set. Its only inputs relating to the center are equalities of finitely many selector values; later siblings of at and all choices off the route of are unrestricted.
Formalization Note Children are Fin (M + 1): a nondefault child is j.castSucc and the default is Fin.last M. The selector value is selectorValue bS ωS, defined on all lists and equal to false on lists of length at least ; the choice rule is select (selectorValue bS ωS) (i.e. chooseChild applied to the selector values), routes are routeFrom, and localLeaf packages a route of the right length as a leaf in List.Vector (Fin (M + 1)) d, carrying the depth proof hdepth. Table cells are addressed by selectorAddress and terminalAddress as dependent pairs (table name, cell index).
import Mathlib
import Definitions.Def_DyadicAvoidance
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_PeriodicBasic
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_GridSeparation
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_FiniteTableModel
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_OrderedRouting
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_RoutingPath
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_CenterRouteExposure
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_ExceptionalCenters
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_CenterFailureBound
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_FirstDefault
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_ConcreteLabelMeasures
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_CenterFirstDefault
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_RandomSetDensity
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_RoutedSetDensity
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_RoutedExposure
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_FirstDefaultSelection
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_FiniteLocalPredicate
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_WindowData
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_WindowTableModel
import Definitions.Def_OAI_MeasureTheory_DyadicAvoidance_StableRoutingBridge
open OAI OAI.Problem310
open FiniteTableModel StableRouting RoutingPath OrderedRouting FiniteLocalPredicate
variable {M d : ℕ}theorem OAI.Problem310.FiniteLocalHit.local_test_implies_root_hit
(bS : Node M d → Fin M → ℕ) (bT : Leaf M d → ℕ)
(ωS : SelectorTable bS) (ωT : TerminalTable bT)
(k r : ℕ) (U : Node M d) (i : Fin M) (x y : ℝ)
(hdepth : (U.val ++ [i.castSucc]).length + r = d)
(hU : routeFrom (select (selectorValue bS ωS)) k [] x = U.val)
(hnd : ∀ l < k, select (selectorValue bS ωS)
(routeFrom (select (selectorValue bS ωS)) l [] x) x ≠ Fin.last M)
(hprefix : ∀ l < k, ∀ j : Fin M,
j.castSucc ≤ select (selectorValue bS ωS)
(routeFrom (select (selectorValue bS ωS)) l [] x) x →
selectorValue bS ωS (routeFrom (select (selectorValue bS ωS)) l [] x) j x =
selectorValue bS ωS (routeFrom (select (selectorValue bS ωS)) l [] x) j y)
(hdefault : select (selectorValue bS ωS) U.val x = Fin.last M)
(hearlier : ∀ j < i, selectorValue bS ωS U.val j x = selectorValue bS ωS U.val j y)
(hlocal : (ωS (selectorAddress bS U i y) &&
ωT (terminalAddress bT
(localLeaf (select (selectorValue bS ωS)) r (U.val ++ [i.castSucc]) hdepth y) y)) = true) :
ωT (terminalAddress bT
(localLeaf (select (selectorValue bS ωS)) d [] (by simp) y) y) = true := by sorry