8#include "../circuit_builders/circuit_builders_fwd.hpp"
9#include "../witness/witness.hpp"
59template <
typename Builder>
class bool_t {
103 void assert_equal(
const bool_t& rhs, std::string
const& msg =
"bool_t::assert_equal")
const;
107 void must_imply(
const bool_t& other, std::string
const& msg =
"bool_t::must_imply")
const;
#define ASSERT(expression,...)
Implements boolean logic in-circuit.
void operator&=(const bool_t &other)
void set_origin_tag(const OriginTag &new_tag) const
bool_t implies(const bool_t &other) const
Implements implication operator in circuit.
bool_t normalize() const
A bool_t element is normalized if witness_inverted == false. For a given *this, output its normalized...
bool_t operator&(const bool_t &other) const
Implements AND in circuit.
void set_free_witness_tag()
uint32_t get_normalized_witness_index() const
bool_t operator!() const
Implements negation in circuit.
static bool_t conditional_assign(const bool_t< Builder > &predicate, const bool_t &lhs, const bool_t &rhs)
Implements the ternary operator - if predicate == true then return lhs, else return rhs.
bool_t operator!=(const bool_t &other) const
Implements the not equal operator in circuit.
void unset_free_witness_tag()
Builder * get_context() const
bool_t operator&&(const bool_t &other) const
bool_t operator||(const bool_t &other) const
void must_imply(const bool_t &other, std::string const &msg="bool_t::must_imply") const
Constrains the (a => b) == true.
bool_t & operator=(const bool other)
Assigns a native bool to bool_t object.
bool_t(const bool_t &other)
void operator^=(const bool_t &other)
void assert_equal(const bool_t &rhs, std::string const &msg="bool_t::assert_equal") const
Implements copy constraint for bool_t elements.
bool_t operator|(const bool_t &other) const
Implements OR in circuit.
bool_t implies_both_ways(const bool_t &other) const
Implements a "double-implication" (<=>), a.k.a "iff", a.k.a. "biconditional".
OriginTag get_origin_tag() const
bool_t operator^(const bool_t &other) const
Implements XOR in circuit.
void operator|=(const bool_t &other)
bool_t operator==(const bool_t &other) const
Implements equality operator in circuit.
std::ostream & operator<<(std::ostream &os, uint256_t const &a)
This file contains part of the logic for the Origin Tag mechanism that tracks the use of in-circuit p...
void unset_free_witness()