Operation Signatures and Interfaces #
This file defines operation signatures and interfaces for the CatCrypt package system. An interface is a finite collection of operation signatures indexed by identifiers.
Main definitions #
OpSig- Operation signature: specifies input and output typesInterface- Collection of operation signatures indexed by natural numbersInterface.empty- Empty interfaceInterface.has- Check if interface contains an operation
References #
Operation signature: specifies the input type (src) and output type (tgt)
Instances For
@[implicit_reducible]
Two operation signatures are equal if their types are the same. Note: This uses heterogeneous equality for Type universes.
An interface entry: an operation id with its signature
Instances For
@[implicit_reducible]
DecidableEq for InterfaceEntry (needed for Finset operations)
Interface: a finite collection of operation signatures indexed by identifiers. We represent this as a finite set of entries with unique ids.
- entries : Finset InterfaceEntry
Instances For
Empty interface
Equations
- CatCrypt.Package.Interface.empty = { entries := ∅, unique_ids := CatCrypt.Package.Interface.empty._proof_1 }
Instances For
@[implicit_reducible]
Equations
- CatCrypt.Package.Interface.instEmptyCollection = { emptyCollection := CatCrypt.Package.Interface.empty }
The set of operation ids in the interface
Equations
- I.ids = Finset.image (fun (x : CatCrypt.Package.InterfaceEntry) => x.id) I.entries