AFTD Auto-Formalizing Theoretical Domains

matroid_indep_query_tree_eval_query_leaf

theoremverified

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 b outputs 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 α →…

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.

  1. 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`).

    line 3

      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

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
See it in the graphDiscuss this resultChallenge it