LMCAS
Lamina Computer Algebra System
Toggle main menu visibility
载入中...
搜索中...
未找到
conditional_result.hpp
浏览该文件的文档.
1
#pragma once
2
3
#include <cstddef>
4
#include <memory>
5
#include <string>
6
#include <utility>
7
#include <variant>
8
#include <vector>
9
10
#include "
proof_outcome.hpp
"
11
#include "
result.hpp
"
12
13
namespace
LMCAS
{
14
15
class
SymbolicExpr;
16
17
18
19
using
ExprPtr
= std::shared_ptr<SymbolicExpr>;
20
21
/**
22
* @brief conditions 是在操作上下文假设下须同时满足的条件。
23
* 空条件保留原表达式定义域且不增加约束;整数参数遍历全体整数。
24
*/
25
struct
FiniteSolution
{
26
ExprPtr
value
;
27
std::size_t
multiplicity
= 1;
28
std::vector<ExprPtr>
conditions
;
29
};
30
31
struct
IntervalSolution
{
32
ExprPtr
lower
;
33
ExprPtr
upper
;
34
bool
lower_closed
=
true
;
35
bool
upper_closed
=
true
;
36
std::vector<ExprPtr>
conditions
;
37
};
38
39
struct
ParametricSolution
{
40
ExprPtr
value
;
41
std::vector<std::string>
integer_parameters
;
42
std::vector<ExprPtr>
conditions
;
43
};
44
45
struct
ConditionSet
{
46
std::string
variable
;
47
ExprPtr
predicate
;
48
std::vector<ExprPtr>
conditions
;
49
};
50
51
struct
EmptySolutions
{};
52
struct
UniversalSolutions
{};
53
struct
FiniteSolutions
{
54
std::vector<FiniteSolution>
values
;
55
};
56
struct
IntervalSolutions
{
57
std::vector<IntervalSolution>
values
;
58
};
59
struct
ConditionalSolutions
{
60
ConditionSet
value
;
61
};
62
struct
ParametricSolutions
{
63
std::vector<ParametricSolution>
values
;
64
};
65
66
/**
67
* @brief 成功的 SolveResult 表示操作定义域内的完整解集。
68
* 完备性未决时返回外层 Inconclusive 错误;EmptySolutions 表示已证明的空解集。
69
*/
70
using
SolutionSet
= std::variant<
71
EmptySolutions
,
72
UniversalSolutions
,
73
FiniteSolutions
,
74
IntervalSolutions
,
75
ConditionalSolutions
,
76
ParametricSolutions
>;
77
using
SolveResult
=
Result<SolutionSet>
;
78
79
/**
80
* @brief 受检变换成功时返回在 conditions 和收敛域 roc 条件下有效的已求值表达式。
81
* 支持性未决或收敛条件无法表示时,返回外层 Inconclusive 错误。
82
*/
83
struct
EvaluatedTransform
{
84
ExprPtr
expression
;
85
std::vector<ExprPtr>
conditions
;
86
std::vector<ExprPtr>
roc
;
87
};
88
using
TransformEngineResult
=
Result<Verified<EvaluatedTransform>
>;
89
90
}
// namespace LMCAS
LMCAS::Result
定义
result.hpp:39
LMCAS
定义
assumption.hpp:11
LMCAS::IntervalSolutions::values
std::vector< IntervalSolution > values
定义
conditional_result.hpp:57
LMCAS::EvaluatedTransform::expression
ExprPtr expression
定义
conditional_result.hpp:84
LMCAS::ConditionSet::variable
std::string variable
定义
conditional_result.hpp:46
LMCAS::FiniteSolution::value
ExprPtr value
定义
conditional_result.hpp:26
LMCAS::IntervalSolution::upper_closed
bool upper_closed
定义
conditional_result.hpp:35
LMCAS::FiniteSolution::conditions
std::vector< ExprPtr > conditions
定义
conditional_result.hpp:28
LMCAS::SolveResult
Result< SolutionSet > SolveResult
定义
conditional_result.hpp:77
LMCAS::IntervalSolution::upper
ExprPtr upper
定义
conditional_result.hpp:33
LMCAS::IntervalSolution::lower_closed
bool lower_closed
定义
conditional_result.hpp:34
LMCAS::ConditionSet::predicate
ExprPtr predicate
定义
conditional_result.hpp:47
LMCAS::ParametricSolution::integer_parameters
std::vector< std::string > integer_parameters
定义
conditional_result.hpp:41
LMCAS::FiniteSolutions::values
std::vector< FiniteSolution > values
定义
conditional_result.hpp:54
LMCAS::ConditionSet::conditions
std::vector< ExprPtr > conditions
定义
conditional_result.hpp:48
LMCAS::ExprPtr
std::shared_ptr< SymbolicExpr > ExprPtr
定义
conditional_result.hpp:19
LMCAS::ParametricSolution::conditions
std::vector< ExprPtr > conditions
定义
conditional_result.hpp:42
LMCAS::TransformEngineResult
Result< Verified< EvaluatedTransform > > TransformEngineResult
定义
conditional_result.hpp:88
LMCAS::EvaluatedTransform::conditions
std::vector< ExprPtr > conditions
定义
conditional_result.hpp:85
LMCAS::SolutionSet
std::variant< EmptySolutions, UniversalSolutions, FiniteSolutions, IntervalSolutions, ConditionalSolutions, ParametricSolutions > SolutionSet
成功的 SolveResult 表示操作定义域内的完整解集。 完备性未决时返回外层 Inconclusive 错误;EmptySolutions 表示已证明的空解集。
定义
conditional_result.hpp:70
LMCAS::ConditionalSolutions::value
ConditionSet value
定义
conditional_result.hpp:60
LMCAS::IntervalSolution::lower
ExprPtr lower
定义
conditional_result.hpp:32
LMCAS::FiniteSolution::multiplicity
std::size_t multiplicity
定义
conditional_result.hpp:27
LMCAS::IntervalSolution::conditions
std::vector< ExprPtr > conditions
定义
conditional_result.hpp:36
LMCAS::ParametricSolution::value
ExprPtr value
定义
conditional_result.hpp:40
LMCAS::ParametricSolutions::values
std::vector< ParametricSolution > values
定义
conditional_result.hpp:63
LMCAS::EvaluatedTransform::roc
std::vector< ExprPtr > roc
定义
conditional_result.hpp:86
LMCAS::ConditionalSolutions
定义
conditional_result.hpp:59
LMCAS::FiniteSolutions
定义
conditional_result.hpp:53
LMCAS::IntervalSolution
定义
conditional_result.hpp:31
LMCAS::ParametricSolutions
定义
conditional_result.hpp:62
LMCAS::ConditionSet
定义
conditional_result.hpp:45
LMCAS::UniversalSolutions
定义
conditional_result.hpp:52
LMCAS::IntervalSolutions
定义
conditional_result.hpp:56
LMCAS::FiniteSolution
conditions 是在操作上下文假设下须同时满足的条件。 空条件保留原表达式定义域且不增加约束;整数参数遍历全体整数。
定义
conditional_result.hpp:25
LMCAS::EmptySolutions
定义
conditional_result.hpp:51
LMCAS::EvaluatedTransform
受检变换成功时返回在 conditions 和收敛域 roc 条件下有效的已求值表达式。 支持性未决或收敛条件无法表示时,返回外层 Inconclusive 错误。
定义
conditional_result.hpp:83
LMCAS::ParametricSolution
定义
conditional_result.hpp:39
proof_outcome.hpp
result.hpp
include
conditional_result.hpp
生成于
, 为 LMCAS使用
1.18.0