Aerobus v1.2
Loading...
Searching...
No Matches
Classes | Public Types | Static Public Attributes | List of all members
aerobus::Quotient< Ring, X > Struct Template Reference

Quotient ring by the principal ideal generated by 'X' With i32 as Ring and i32::val<2> as X, Quotient is Z/2Z. More...

#include <aerobus.h>

Classes

struct  val
 projection values in the quotient ring More...
 

Public Types

using zero = val< typename Ring::zero >
 zero value
 
using one = val< typename Ring::one >
 one
 
template<typename v1 , typename v2 >
using add_t = val< typename Ring::template add_t< typename v1::type, typename v2::type > >
 addition operator
 
template<typename v1 , typename v2 >
using mul_t = val< typename Ring::template mul_t< typename v1::type, typename v2::type > >
 substraction operator
 
template<typename v1 , typename v2 >
using div_t = val< typename Ring::template div_t< typename v1::type, typename v2::type > >
 division operator
 
template<typename v1 , typename v2 >
using mod_t = val< typename Ring::template mod_t< typename v1::type, typename v2::type > >
 modulus operator
 
template<typename v1 , typename v2 >
using eq_t = typename Ring::template eq_t< typename v1::type, typename v2::type >
 equality operator (as type)
 
template<typename v1 >
using pos_t = std::true_type
 positivity operator always true
 
template<auto x>
using inject_constant_t = val< typename Ring::template inject_constant_t< x > >
 inject a 'constant' in quotient ring*
 
template<typename v >
using inject_ring_t = val< v >
 projects a value of Ring onto the quotient
 

Static Public Attributes

template<typename v1 , typename v2 >
static constexpr bool eq_v = Ring::template eq_t<typename v1::type, typename v2::type>::value
 addition operator (as boolean value)
 
template<typename v >
static constexpr bool pos_v = pos_t<v>::value
 positivity operator always true
 
static constexpr bool is_euclidean_domain = true
 quotien rings are euclidean domain
 

Detailed Description

template<typename Ring, typename X>
requires IsRing<Ring>
struct aerobus::Quotient< Ring, X >

Quotient ring by the principal ideal generated by 'X' With i32 as Ring and i32::val<2> as X, Quotient is Z/2Z.

Template Parameters
RingA ring type, such as 'i32', must satisfy the IsRing concept
Xa value in Ring, such as i32::val<2>

Member Typedef Documentation

◆ add_t

template<typename Ring , typename X >
template<typename v1 , typename v2 >
using aerobus::Quotient< Ring, X >::add_t = val<typename Ring::template add_t<typename v1::type, typename v2::type> >

addition operator

Template Parameters
v1a value in quotient ring
v2a value in quotient ring

◆ div_t

template<typename Ring , typename X >
template<typename v1 , typename v2 >
using aerobus::Quotient< Ring, X >::div_t = val<typename Ring::template div_t<typename v1::type, typename v2::type> >

division operator

Template Parameters
v1a value in quotient ring
v2a value in quotient ring

◆ eq_t

template<typename Ring , typename X >
template<typename v1 , typename v2 >
using aerobus::Quotient< Ring, X >::eq_t = typename Ring::template eq_t<typename v1::type, typename v2::type>

equality operator (as type)

Template Parameters
v1a value in quotient ring
v2a value in quotient ring

◆ inject_constant_t

template<typename Ring , typename X >
template<auto x>
using aerobus::Quotient< Ring, X >::inject_constant_t = val<typename Ring::template inject_constant_t<x> >

inject a 'constant' in quotient ring*

Template Parameters
xa 'constant' from Ring point of view

◆ inject_ring_t

template<typename Ring , typename X >
template<typename v >
using aerobus::Quotient< Ring, X >::inject_ring_t = val<v>

projects a value of Ring onto the quotient

Template Parameters
va value in Ring

◆ mod_t

template<typename Ring , typename X >
template<typename v1 , typename v2 >
using aerobus::Quotient< Ring, X >::mod_t = val<typename Ring::template mod_t<typename v1::type, typename v2::type> >

modulus operator

Template Parameters
v1a value in quotient ring
v2a value in quotient ring

◆ mul_t

template<typename Ring , typename X >
template<typename v1 , typename v2 >
using aerobus::Quotient< Ring, X >::mul_t = val<typename Ring::template mul_t<typename v1::type, typename v2::type> >

substraction operator

Template Parameters
v1a value in quotient ring
v2a value in quotient ring

◆ one

template<typename Ring , typename X >
using aerobus::Quotient< Ring, X >::one = val<typename Ring::one>

one

◆ pos_t

template<typename Ring , typename X >
template<typename v1 >
using aerobus::Quotient< Ring, X >::pos_t = std::true_type

positivity operator always true

Template Parameters
v1a value in quotient ring

◆ zero

template<typename Ring , typename X >
using aerobus::Quotient< Ring, X >::zero = val<typename Ring::zero>

zero value

Member Data Documentation

◆ eq_v

template<typename Ring , typename X >
template<typename v1 , typename v2 >
constexpr bool aerobus::Quotient< Ring, X >::eq_v = Ring::template eq_t<typename v1::type, typename v2::type>::value
staticconstexpr

addition operator (as boolean value)

Template Parameters
v1a value in quotient ring
v2a value in quotient ring

◆ is_euclidean_domain

template<typename Ring , typename X >
constexpr bool aerobus::Quotient< Ring, X >::is_euclidean_domain = true
staticconstexpr

quotien rings are euclidean domain

◆ pos_v

template<typename Ring , typename X >
template<typename v >
constexpr bool aerobus::Quotient< Ring, X >::pos_v = pos_t<v>::value
staticconstexpr

positivity operator always true

Template Parameters
v1a value in quotient ring

The documentation for this struct was generated from the following file: