import {
  __export
} from "./chunk-QK4PKNB3.mjs";

// src/number.ts
var number_exports = {};
__export(number_exports, {
  Bounded: () => Bounded,
  Eq: () => Eq,
  Field: () => Field,
  MagmaSub: () => MagmaSub,
  MonoidProduct: () => MonoidProduct,
  MonoidSum: () => MonoidSum,
  Ord: () => Ord,
  SemigroupProduct: () => SemigroupProduct,
  SemigroupSum: () => SemigroupSum,
  Show: () => Show,
  isNumber: () => isNumber
});
var isNumber = (u) => typeof u === "number";
var Eq = {
  equals: (first, second) => first === second
};
var Ord = {
  equals: Eq.equals,
  compare: (first, second) => first < second ? -1 : first > second ? 1 : 0
};
var Bounded = {
  equals: Eq.equals,
  compare: Ord.compare,
  top: Infinity,
  bottom: -Infinity
};
var Show = {
  show: (n) => JSON.stringify(n)
};
var MagmaSub = {
  concat: (first, second) => first - second
};
var SemigroupSum = {
  concat: (first, second) => first + second
};
var SemigroupProduct = {
  concat: (first, second) => first * second
};
var MonoidSum = {
  concat: SemigroupSum.concat,
  empty: 0
};
var MonoidProduct = {
  concat: SemigroupProduct.concat,
  empty: 1
};
var Field = {
  add: SemigroupSum.concat,
  zero: 0,
  mul: SemigroupProduct.concat,
  one: 1,
  sub: MagmaSub.concat,
  degree: (_) => 1,
  div: (first, second) => first / second,
  mod: (first, second) => first % second
};

export {
  isNumber,
  Eq,
  Ord,
  Bounded,
  Show,
  MagmaSub,
  SemigroupSum,
  SemigroupProduct,
  MonoidSum,
  MonoidProduct,
  Field,
  number_exports
};
