pith. machine review for the scientific record. sign in
def definition def or abbrev high

zmodCost

show as:
view Lean formalization →

The equality cost on a cyclic carrier returns zero for identical elements of ZMod n and one otherwise. It is cited by modular realization constructions that equip the finite cyclic group with a discrete cost for logic interpretations. The definition is a direct conditional with no auxiliary lemmas.

claimFor each natural number $n$, the function $c: (Z/nZ) times (Z/nZ) to N$ is defined by $c(a,b)=0$ if $a=b$ and $c(a,b)=1$ otherwise.

background

The ModularRealization module realizes logic on cyclic carriers ZMod n equipped with an equality cost. The carrier is the finite cyclic group of order n; the cost returns zero precisely on the diagonal and one off it. This permits the semantic orbit to close inside the finite set, certifying the forced arithmetic as a universal iteration object.

proof idea

The definition is a direct conditional expression that inspects equality of the two ZMod arguments. It is the base object referenced by the identical definition in Strict.Modular and by the downstream theorems zmodCost_self and zmodCost_symm.

why it matters in Recognition Science

zmodCost supplies the compare field of modularRealization, which builds a LogicRealization instance with carrier ZMod n and cost type Nat. The same definition is reused in strictModularRealization. Within the Recognition framework it realizes the modular case of universal forcing on a cyclic carrier whose orbit closes after finitely many steps.

scope and limits

formal statement (Lean)

  20def zmodCost {n : ℕ} (a b : ZMod n) : Nat :=

proof body

Definition body.

  21  if a = b then 0 else 1
  22

used by (7)

From the project-wide theorem graph. These declarations reference this one in their body.

depends on (1)

Lean names referenced from this declaration's body.