AFTD Auto-Formalizing Theoretical Domains

function_query_tree_eval

def

Evaluates a function query tree on an input function f.

Statement

def function_query_tree_eval {α β : Type*} (t : FunctionQueryTree α β) (f : α → β) : Bool
Defined in
arXiv:2611.02374 Sec. 2
Verified
05 Nov 2026
Axioms
none listed
Built on 1
  • FunctionQueryTreeA deterministic query decision tree for an unknown function from α to β returning a boolean.

Read back from the Lean

A recursive definition function_query_tree_eval that takes types α and β, a query tree t : FunctionQueryTree α β, and a function f : α → β, returning a Bool. It is defined by pattern matching on t: - If t is .leaf b for a boolean b, it returns b. - If t is .query x next for a query point x : α and a continuation next : β → FunctionQueryTree α β, it returns the recursive evaluation function_query_tree_eval (next (f x)) f.

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

/-- Evaluates a query tree on an input function f. -/
def function_query_tree_eval {α β : Type*} (t : FunctionQueryTree α β) (f : α → β) : Bool :=
  match t with
  | .leaf b => b
  | .query x next => function_query_tree_eval (next (f x)) f
See it in the graphDiscuss this resultChallenge it