AFTD Auto-Formalizing Theoretical Domains

affine_form_to_free_algebra

def

Given a commutative semiring F, a natural number m, and an affine form a : AffineForm F m, affine_form_to_free_algebra a is the element of FreeAlgebra F (Fin m) defined by algebraMap F (FreeAlgebra F (Fin m)) a.c0 + ∑ i : Fin m, algebraMap F (FreeAlgebra F (Fin m)) (a.c i) * FreeAlgebra.ι F i.

Statement

def affine_form_to_free_algebra {F : Type*} [CommSemiring F] {m : ℕ} (a : AffineForm F m) :
    FreeAlgebra F (Fin m)
Defined in
arXiv:2610.37677, Section 1.1
Verified
30 Oct 2026
Axioms
none listed
Built on 1
  • AffineFormAn affine linear form parameterized by a type F and an arity m : ℕ consists of a constant term c0 : F and a tuple of linear coefficients c…
Used by 4
  • ncabp_eval_poly_zero_directionGiven a field F, natural numbers m, S, R, a matrix tuple T : Fin m → Matrix (Fin R) (Fin R) F, and an ncABP A : NcABP F m S such that…
  • ncabp_eval_polyGiven a commutative semiring F, parameters m, S : ℕ, and an ncABP A : NcABP F m S, ncabp_eval_poly A is the polynomial in FreeAlgebra F…
  • is_ncabp_hitting_tupleGiven a field F and natural numbers m, S, R, a tuple of matrices T : Fin m → Matrix (Fin R) (Fin R) F is an ncABP hitting tuple if for…
  • ncabp_matrixGiven a commutative semiring F, parameters m, S : ℕ, and an ncABP A : NcABP F m S, ncabp_matrix A is the transition matrix in Matrix (Fin…

Read back from the Lean

For a commutative semiring F, a natural number m, and an affine form a : AffineForm F m, affine_form_to_free_algebra defines the element of FreeAlgebra F (Fin m) given by the sum of the scalar embedding of a.c0 and the sum over all i : Fin m of the product of the scalar embedding of a.c i and the free algebra generator FreeAlgebra.ι F i.

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

/-- Canonical embedding of an affine linear form into FreeAlgebra F (Fin m). -/
def affine_form_to_free_algebra {F : Type*} [CommSemiring F] {m : ℕ} (a : AffineForm F m) :
    FreeAlgebra F (Fin m) := open BigOperators in algebraMap F (FreeAlgebra F (Fin m)) a.c0 + ∑ i : Fin m, algebraMap F (FreeAlgebra F (Fin m)) (a.c i) * FreeAlgebra.ι F i
See it in the graphDiscuss this resultChallenge it