signOf
plain-language theorem explainer
signOf maps each integer to one of three sign categories in the Sign type. Workers on concrete recognition geometries cite it to construct the sign recognizer on the integers. The definition is a direct conditional split that returns neg for negative inputs, zero for zero, and pos otherwise.
Claim. The sign function from the integers to the three-valued sign type is defined by returning the negative constructor when the input is less than zero, the zero constructor when the input is zero, and the positive constructor otherwise.
background
The module develops concrete recognition geometries on the integers. One instance partitions the integers into three equivalence classes under indistinguishability: negative, zero, and positive. The Sign type is the inductive type whose constructors are exactly these three labels and which carries decidable equality. signOf supplies the recognition map for the sign recognizer, which is then used to define when two integers are indistinguishable.
proof idea
The definition is given by a direct conditional expression on the input integer that first tests negativity, then zero, and defaults to positive.
why it matters
signOf supplies the recognition map for the sign recognizer example, which shows that the quotient has exactly three classes. It is invoked by sign_indistinguishable to establish that two integers are indistinguishable under the recognizer precisely when they share the same sign value. The example illustrates how recognition refines the space and feeds into later composition results for recognizers.
Switch to Lean above to see the machine-checked source, dependencies, and usage graph.