For
#include <flint/fexpr_builtin.h>ForFor(x, ...) binds the symbol x as a local variable in its parent expression; the further arguments give a range, set or point whose meaning depends on the parent operator. For(x, S) iterates over a set, optionally followed by a filter predicate P(x), as in Set(f(x), For(x, S), P(x)) (\left\{ f(x) : x \in S\,\mathbin{\operatorname{and}}\, P(x) \right\}) or Sum(f(x), For(x, S)) (\sum_{x \in S} f(x)). For(x, a, b) lets x run between endpoints, as in Sum(f(n), For(n, a, b)) (\sum_{n=a}^{b} f(n)) or Integral(f(x), For(x, a, b)) (\int_{a}^{b} f(x) \, dx). For(x, a) lets x approach a point or selects a point of differentiation, as in Limit(f(x), For(x, a)) (\lim_{x \to a} f(x)) or Derivative(f(x), For(x, a)) (f'\!\left(a\right)), and For(x, a, n) gives the order of a derivative, as in Derivative(f(x), For(x, a, n)) ({f}^{(n)}\!\left(a\right)).
A sum Sum(f(n), For(n, a, b)) is empty if b < a. An integral Integral(f(x), For(x, a, b)) follows the straight-line path from a to b; swapping the endpoints negates it.
Guides#
The FLINT team, “For (fexpr_builtin.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fexpr_builtin/For.html (generated 2026-10-20).
@misc{flint-doc-fexpr-builtin-For,
author = {{The FLINT team}},
title = {{For (fexpr\_builtin.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fexpr_builtin/For.html},
note = {Generated 2026-10-20}
}