AFTD Auto-Formalizing Theoretical Domains

is_tau_approx_greedy

def

An online reply sequence alg_reply is tau-approximately greedy if each alg_reply i is feasible (alg_reply i ∈ replies i) and its marginal cost increase at step i is at most tau times the marginal cost increase of any other feasible reply R ∈ replies i.

Statement

def is_tau_approx_greedy {E : Type*} [DecidableEq E] {N : ℕ}
    (c : E → ℝ) (pe : E → ℝ) (w : Fin N → E → ℝ)
    (replies : Fin N → Set (Finset E))
    (alg_reply : Fin N → Finset E) (τ : ℝ) : Prop
Defined in
arXiv:2611.30912 Section 2
Verified
26 Nov 2026
Axioms
none listed
Built on 2
  • gnd_marginal_costThe marginal increase in total power cost caused by assigning a request with weight vector w to a reply set reply ⊆ E under current load…
  • gnd_partial_loadFor a sequence of N requests, the online load on resource e immediately prior to processing request i is the sum of weights w j e over…

Read back from the Lean

Given a type E with decidable equality, a natural number N, functions c, pe : E → ℝ, a weight function w : Fin N → E → ℝ, a set of allowed replies for each step replies : Fin N → Set (Finset E), an algorithm's chosen replies alg_reply : Fin N → Finset E, and a real factor τ : ℝ, the definition is_tau_approx_greedy asserts the conjunction of two conditions: 1. For every i : Fin N, alg_reply i ∈ replies i. 2. For every i : Fin N and every finite set R : Finset E, if R ∈ replies i, then the marginal cost of choosing alg_reply i given the partial load accumulated by indices j < i is at most τ times the marginal cost of choosing R given the same partial load.

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

/-- Predicate asserting that an online sequence of replies is tau-approximately greedy with respect to marginal cost increase. -/
def is_tau_approx_greedy {E : Type*} [DecidableEq E] {N : ℕ}
    (c : E → ℝ) (pe : E → ℝ) (w : Fin N → E → ℝ)
    (replies : Fin N → Set (Finset E))
    (alg_reply : Fin N → Finset E) (τ : ℝ) : Prop := (∀ i : Fin N, alg_reply i ∈ replies i) ∧
  (∀ (i : Fin N) (R : Finset E), R ∈ replies i →
    gnd_marginal_cost c pe (gnd_partial_load alg_reply w i) (w i) (alg_reply i) ≤
      τ * gnd_marginal_cost c pe (gnd_partial_load alg_reply w i) (w i) R)
See it in the graphDiscuss this resultChallenge it