#pragma once
#include "math/ff/ff_polynomial.h"
namespace ff {
struct certificate {
enum class rule { input, multiply, add };
struct node {
rule kind;
unsigned left = 0, right = 0;
rational coefficient{1};
monomial factor;
};
std::vector<node> nodes;
unsigned root = 0;
};
enum class certificate_backend { scalar, f4, native, automatic };
lbool solve_with_certificate(engine &arithmetic, std::vector<polynomial> const &equations,
std::vector<rational> &values, certificate &output,
unsigned max_nodes = 100000,
bool native_unique = true, bool native_branches = true);
bool certify(engine &arithmetic, std::vector<polynomial> const &equations,
certificate &output, unsigned max_nodes = 100000,
certificate_backend backend = certificate_backend::automatic,
bool native_unique = true, bool native_branches = true);
}