Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::morphologies::first_iso_mod_2::mod_2_arrow Struct Referenceexport

The parity homomorphism mod_2: int → bool. More...

Public Types

using Domain = int
using Codomain = bool

Public Member Functions

constexpr bool operator() (int x) const noexcept

Detailed Description

The parity homomorphism mod_2: int → bool.

Uses x % 2 rather than x & 1: the representation-independent parity test matches the textbook reading "remainder mod 2" exactly, and is well-defined for negative x on every C++ implementation (the tests exercise negative inputs).


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