Classical.Signatures.Finite¶
Finite finitary witnesses for concrete signatures¶
This is the Classical.Signatures.Finite module of the Agda Universal Algebra Library.
The record FiniteSignature of Setoid.Signatures.Finite packages
what it means for a signature to be finite finitary: a finite surjective
enumeration of its operation symbols, plus the Finitary witness
that every arity is finite. This module supplies the following canonical sanity-check
instances:1
Sig-Lattice(Classical.Signatures.Lattice): two binary operation symbols; both halves of the witness are finite case splits.Sig-Unary A(Classical.Signatures.Unary): one unary symbol per element ofA; the witness is exactly an enumeration ofA.
A caveat on enumerations up to ≈ versus up to ≡¶
The symbol type of a signature is a bare type, so opEnum-sur demands
surjectivity up to propositional equality _≡_. The carrier enumeration of a
FiniteAlgebra (Setoid.Algebras.Finite) is surjective only up to
the carrier's setoid equality _≈_, which is not enough here. Indeed, on a
quotient carrier the enumeration hits every element up to the coarser ≈ while
missing raw elements up to ≡.
Consequently Sig-Unary-FiniteSignature below asks for an honest
_≡_-surjective enumeration of the bare type A rather than for a
FiniteAlgebra witness. In the intended applications this costs
nothing; in points of fact,
- for a concrete finite group the raw carrier is typically
Fin nor a finite data type, where≈is≡; - the raw carrier of a quotient
G/His that ofGitself, so the same bare enumeration serves all coset algebras ofGwith no choice of coset representatives.
The lattice signature is finite finitary¶
Both lattice operation symbols are binary, so the Finitary
witness names the identity bijection once per symbol, and the symbol enumeration
lists the two symbols.
-- Each lattice operation symbol has finite arity (namely 2). Sig-Lattice-Finitary : Finitary Sig-Lattice Sig-Lattice-Finitary ∧-Op = 2 , ↔-id _ Sig-Lattice-Finitary ∨-Op = 2 , ↔-id _ -- The lattice signature is finite finitary. Sig-Lattice-FiniteSignature : FiniteSignature Sig-Lattice Sig-Lattice-FiniteSignature .opCard = 2 Sig-Lattice-FiniteSignature .opEnum zero = ∧-Op Sig-Lattice-FiniteSignature .opEnum (suc zero) = ∨-Op Sig-Lattice-FiniteSignature .opEnum-sur ∧-Op = zero , refl Sig-Lattice-FiniteSignature .opEnum-sur ∨-Op = suc zero , refl Sig-Lattice-FiniteSignature .finitary = Sig-Lattice-Finitary
The unary signature over an enumerated symbol type¶
Given a surjective (up to _≡_; see the caveat above) enumeration of the bare
type A, the unary signature over A is finite finitary: the symbol enumeration
is the given one, and every arity is Fin 1 definitionally.
module _ {ℓ : Level}{A : Type ℓ} (n : ℕ)(e : Fin n → A)(e-sur : (a : A) → ∃[ i ] e i ≡ a) where -- The unary signature over an enumerated symbol type is finite finitary. Sig-Unary-FiniteSignature : FiniteSignature (Sig-Unary A) Sig-Unary-FiniteSignature .opCard = n Sig-Unary-FiniteSignature .opEnum = e Sig-Unary-FiniteSignature .opEnum-sur = e-sur Sig-Unary-FiniteSignature .finitary _ = 1 , ↔-id _
-
We place these instances here, rather than beside the record, because concrete signatures live in the
Classical/tree and theSetoid/tree does not import it. ↩