Documentation

CatCryptCore.Package.RawPackage

Raw Packages #

This file defines raw packages - collections of typed function implementations. A raw package maps operation identifiers to their implementations.

Main definitions #

References #

A typed function: source type, target type, and implementation

Instances For

    Package entry: operation id with its typed implementation

    Instances For
      @[implicit_reducible]

      DecidableEq for PackageEntry (needed for Finset operations)

      Equations

      Raw package: a finite collection of typed function implementations. Each entry maps an operation id to its implementation.

      Instances For

        The set of operation ids implemented by the package

        Equations
        Instances For

          Check if a package implements an operation with given id and types

          Equations
          Instances For

            Lookup an implementation by id (noncomputable)

            Equations
            Instances For
              noncomputable def CatCrypt.Package.RawPackage.singleton (id : ) (S T : Type) (f : SCore.SPComp T) :

              Single function package

              Equations
              Instances For

                Two packages are disjoint if they share no operation ids

                Equations
                Instances For
                  noncomputable def CatCrypt.Package.RawPackage.par (P₁ P₂ : RawPackage) (h : P₁.Disjoint P₂) :

                  Parallel composition: combine two packages with disjoint ids

                  Equations
                  Instances For
                    theorem CatCrypt.Package.RawPackage.par_ids {P₁ P₂ : RawPackage} (h : P₁.Disjoint P₂) :
                    (P₁.par P₂ h).ids = P₁.ids P₂.ids
                    noncomputable def CatCrypt.Package.RawPackage.resolve (P : RawPackage) (id : ) {S T : Type} (x : S) :

                    Resolve: find the implementation for an operation id and call it. Returns fail if the operation is not implemented.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Identity package: implements an interface by just forwarding

                      Equations
                      Instances For