AFTD Auto-Formalizing Theoretical Domains

MatroidIndepQueryTree.eval

def

The Boolean output of an independence-query decision tree T on a ground set α when the queries are answered by an oracle o : Finset α → Bool (o S = true meaning that S is independent). The arguments are the oracle o first, then the tree, and the value is a Boolean, defined by recursion on the tree: a leaf leaf b evaluates to b; a query node query S no yes evaluates to the value of the subtree yes (on the same oracle) if o S = true, and to the value of the subtree no otherwise.

Statement

def MatroidIndepQueryTree.eval {α : Type*} (o : Finset α → Bool) : MatroidIndepQueryTree α → Bool
Defined in
arXiv:2611.23624 (Matroid Connectedness and Component Decomposition: Breaking the Quadratic Barrier), Section 2 (the run of a deterministic independence-query algorithm)
Verified
19 Nov 2026
Axioms
none listed
Built on 1
  • MatroidIndepQueryTreeA deterministic independence-query algorithm on a ground set α, as a rooted binary decision tree: a leaf leaf b outputs the Boolean b;…
Used by 15

Read back from the Lean

Definition of MatroidIndepQueryTree.eval: for a type α, given an oracle function o : Finset α → Bool and a tree of type MatroidIndepQueryTree α, it evaluates the tree to a Bool recursively: - if the tree is a leaf node leaf b with boolean value b, it returns b; - if the tree is a query node query S no yes with queried set S : Finset α and subtrees no and yes, it evaluates o S: if o S = true, it recurses on yes, and otherwise (if o S = false), it recurses on no.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- The output of an independence-query tree when the oracle answers `o S` to the query `S`. -/
def MatroidIndepQueryTree.eval {α : Type*} (o : Finset α → Bool) : MatroidIndepQueryTree α → Bool
  | .leaf b => b
  | .query S no yes => if o S = true then yes.eval o else no.eval o
See it in the graphDiscuss this resultChallenge it