1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Integral bound types for mathematical expressions.
use Expression;
/// Bounds for definite integrals.
///
/// Represents the lower and upper bounds of integration.
///
/// # Examples
///
/// ```
/// use mathlex::ast::{IntegralBounds, ExprKind, Expression};
///
/// // Integral from 0 to 1
/// let bounds = IntegralBounds {
/// lower: Box::new(Expression::integer(0)),
/// upper: Box::new(Expression::integer(1)),
/// };
///
/// assert_eq!(*bounds.lower, Expression::integer(0));
/// assert_eq!(*bounds.upper, Expression::integer(1));
/// ```
/// Bounds for multiple integrals (region specification).
///
/// Contains bounds for each variable of integration in order.
/// For a double integral ∬_R f dA, the region R may be specified
/// as separate bounds for each variable.
///
/// # Examples
///
/// ```ignore
/// // Bounds for ∬_[0,1]×[0,2] f(x,y) dy dx
/// MultipleBounds {
/// bounds: vec![
/// IntegralBounds { lower: 0, upper: 1 }, // x bounds
/// IntegralBounds { lower: 0, upper: 2 }, // y bounds
/// ],
/// }
/// ```