AFTD Auto-Formalizing Theoretical Domains

matroid_query_tree_lift

def

Given a query translation f and a Boolean validity test g, any independence-query tree T on γ becomes an independence-query tree on β: a leaf stays a leaf; at a query node Q, if g Q is true we ask the translated query f Q and recurse on both subtrees, and if g Q is false the answer is known in advance to be false, so we simply skip the node and recurse on the "no" subtree.

Statement

def matroid_query_tree_lift {β γ : Type*} (f : Finset γ → Finset β) (g : Finset γ → Bool) :
    MatroidIndepQueryTree γ → MatroidIndepQueryTree β
Source
step towards matroid_linear_of_bipartite_neighbor_query
Verified
28 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;…

Lean source view module on GitHub

/-- Lift an independence-query decision tree over a ground set γ to one over β, translating each query with `f` when the validity test `g` passes and treating other queries as known-false (taking the `false` branch). -/
def matroid_query_tree_lift {β γ : Type*} (f : Finset γ → Finset β) (g : Finset γ → Bool) :
    MatroidIndepQueryTree γ → MatroidIndepQueryTree β
  | .leaf b => .leaf b
  | .query Q t₁ t₂ =>
      if g Q then .query (f Q) (matroid_query_tree_lift f g t₁) (matroid_query_tree_lift f g t₂)
      else matroid_query_tree_lift f g t₁
See it in the graphDiscuss this resultChallenge it