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
56
57
//! 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, Expression};
///
/// // Integral from 0 to 1
/// let bounds = IntegralBounds {
/// lower: Box::new(Expression::Integer(0)),
/// upper: Box::new(Expression::Integer(1)),
/// };
///
/// match (*bounds.lower, *bounds.upper) {
/// (Expression::Integer(0), Expression::Integer(1)) => println!("Bounds are 0 to 1"),
/// _ => panic!("Unexpected bounds"),
/// }
/// ```
/// 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
/// ],
/// }
/// ```