matroid_indep_query_tree_eval_query_leaf
The one-query tree that asks S and outputs c on yes and b on no evaluates, on an oracle o, to c if o S = true and to b otherwise.
Statement
theorem matroid_indep_query_tree_eval_query_leaf {α : Type*} (o : Finset α → Bool) (S : Finset α) (b c : Bool) : (MatroidIndepQueryTree.query S (.leaf b) (.leaf c)).eval o = if o S = true then c else b
- Source
- Sanity lemma / helper for the statements of OP-1998 (arXiv:2611.23624 (Matroid Connectedness and Component Decomposition: Breaking the Quadratic Barrier))
- Verified
- 19 Nov 2026
- Axioms
Quot.soundpropext- Built on 2
- MatroidIndepQueryTreeA deterministic independence-query algorithm on a ground set α, as a rooted binary decision tree: a leaf
leaf boutputs the Boolean b;… - MatroidIndepQueryTree.evalThe Boolean output of an independence-query decision tree T on a ground set α when the queries are answered by an oracle o : Finset α →…
- MatroidIndepQueryTreeA deterministic independence-query algorithm on a ground set α, as a rooted binary decision tree: a leaf
The proof, explained
The theorem states that evaluating a decision tree consisting of a single query $S$ with outcomes $c$ (on true) and $b$ (on false) against an oracle $o$ produces $c$ if $o(S) = \text{true}$ and $b$ otherwise. This identity holds immediately by the definition of evaluation on query trees, so the proof is completed by reflexivity.
Evaluating the decision tree `query S (.leaf b) (.leaf c)` against oracle `o` yields `if o S = true then c else b`.
By the definition of `MatroidIndepQueryTree.eval`, evaluating a query node `query S no yes` on an oracle `o` branches on whether `o S = true`, returning `eval o yes` if true and `eval o no` if false. For the leaves `.leaf c` and `.leaf b`, `eval` evaluates directly to `c` and `b` respectively. Thus, both sides of the equality are definitionally identical, and the claim holds by reflexivity (`rfl`).
rfl
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem matroid_indep_query_tree_eval_query_leaf {α : Type*} (o : Finset α → Bool) (S : Finset α) (b c : Bool) : (MatroidIndepQueryTree.query S (.leaf b) (.leaf c)).eval o = if o S = true then c else b := by rfl