Atoms for Nominal Sets #
This file defines atoms, which are abstract names used in nominal set theory. Atoms are represented as wrapped natural numbers, providing a countably infinite supply of distinguishable names.
Main definitions #
Atom- The type of atoms (wrapped naturals)Atom.fresh- Generate a fresh atom not in a given finite setAtom.freshN- Generate n fresh atoms
References #
- Pitts, Nominal Sets: Names and Symmetry in Computer Science, Cambridge University Press, 2013.
- Larsen and Schürmann, Nominal State-Separating Proofs, IACR ePrint 2025/598 — the SSProve
Nominal/layer this development ports. - SSProve Nominal Package
Atoms are abstract names, represented as wrapped natural numbers. This provides a countably infinite supply of distinguishable names.
- val : ℕ
Instances For
@[implicit_reducible]
@[implicit_reducible]
Equations
Instances For
@[implicit_reducible]
Equations
Equations
- CatCrypt.Nominal.instReprAtom.repr x✝ prec✝ = Std.Format.bracket "{ " (Std.Format.nil ++ Std.Format.text "val" ++ Std.Format.text " := " ++ (Std.Format.nest 7 (repr x✝.val)).group) " }"
Instances For
Equations
- CatCrypt.Nominal.instOrdAtom.ord { val := a } { val := b } = (compare a b).then Ordering.eq
Instances For
@[implicit_reducible]
Equations
@[implicit_reducible]
@[implicit_reducible]
Coercion to natural numbers
Equations
@[implicit_reducible]
Linear order on atoms inherited from naturals
@[implicit_reducible]
Equations
- CatCrypt.Nominal.Atom.instOrderBot = { bot := { val := 0 }, bot_le := CatCrypt.Nominal.Atom.instOrderBot._proof_1 }
Offset: one plus the maximum in a set, used for fresh generation
Equations
- CatCrypt.Nominal.Atom.offset s = if h : s.Nonempty then s.sup' h CatCrypt.Nominal.Atom.val + 1 else 0
Instances For
Fresh atom: the smallest atom not in the given set
Equations
- CatCrypt.Nominal.Atom.fresh s = { val := CatCrypt.Nominal.Atom.offset s }
Instances For
The fresh atom is not in the original set
Generate n fresh atoms not in the given set
Equations
- CatCrypt.Nominal.Atom.freshN s n = Finset.image (fun (i : ℕ) => { val := CatCrypt.Nominal.Atom.offset s + i }) (Finset.range n)
Instances For
Equations
- CatCrypt.Nominal.Atom.a₁ = { val := 1 }