AFTD Auto-Formalizing Theoretical Domains

eval_binary_word

def

The evaluation of a binary word w : List (Fin 2) on elements σ₀, σ₁ of a monoid G is the product in G of the letters mapped by 0 ↦ σ₀ and 1 ↦ σ₁.

Statement

def eval_binary_word {G : Type*} [Monoid G] (w : List (Fin 2)) (σ₀ σ₁ : G) : G
Defined in
arXiv:2610.11098 Section 1
Verified
25 Oct 2026
Axioms
none listed
Used by 1

Read back from the Lean

Given a monoid G, a list w of elements of Fin 2, and elements σ₀, σ₁ : G, eval_binary_word w σ₀ σ₁ is defined as the product in G of the list obtained by replacing each 0 in w with σ₀ and each 1 in w with σ₁ (via ![σ₀, σ₁]).

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 binary word (as a list over `Fin 2`) on a pair of elements `σ₀, σ₁` of a monoid `G`. -/
def eval_binary_word {G : Type*} [Monoid G] (w : List (Fin 2)) (σ₀ σ₁ : G) : G := (w.map (![σ₀, σ₁])).prod
See it in the graphDiscuss this resultChallenge it