Documentation

LeanPool.Circuitlib.Circuit.Category.Combinational

Combinational circuit category #

References #

structure Circuit.CombinationalCircuitCategory (V : Type u_1) (G : Type u_2) :

Category of combinational circuits.

  • of :: (
    • obj :

      The number of wires of this object.

  • )
Instances For
    @[implicit_reducible]
    Equations
    @[inline]

    The underlying identity wire-function.

    Equations
    Instances For
      @[implicit_reducible, inline]
      Equations
      • One or more equations did not get rendered due to their size.
      @[inline]

      The wire-function that duplicates its single input wire.

      Equations
      Instances For
        @[inline]

        The wire-function that joins two input wires by taking their supremum.

        Equations
        Instances For
          @[reducible, inline]

          The monoidal product of two objects, adding their wire counts.

          Equations
          Instances For
            @[implicit_reducible, inline]
            Equations
            • One or more equations did not get rendered due to their size.
            @[reducible, inline]
            abbrev Circuit.CombinationalCircuitCategory.tensorHomVal {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ Y₁ X₂ Y₂ : CombinationalCircuitCategory V G} (f : X₁ Y₁) (g : X₂ Y₂) (v : Wires V (X₁.obj + X₂.obj)) :
            Wires V (Y₁.obj + Y₂.obj)

            The underlying wire-function of the monoidal product of two morphisms.

            Equations
            Instances For
              theorem Circuit.CombinationalCircuitCategory.tensorHom_eq {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ Y₁ X₂ : CombinationalCircuitCategory V G} (a : Wires V (X₁.obj + X₂.obj)) (f : X₁ Y₁) :
              (f (Vector.ofFn fun (i : Fin X₁.obj) => Vector.get a (Fin.castAdd X₂.obj i))).toArray.size = Y₁.obj
              theorem Circuit.CombinationalCircuitCategory.tensorHom_take {V : Type v} {G : Type u} {X₁ X₂ : CombinationalCircuitCategory V G} (a : Wires V (X₁.obj + X₂.obj)) :
              Vector.cast (Vector.take a X₁.obj) = Vector.ofFn fun (i : Fin X₁.obj) => Vector.get a (Fin.castAdd X₂.obj i)
              theorem Circuit.CombinationalCircuitCategory.tensorHom_eq_left {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ Y₁ X₂ Y₂ : CombinationalCircuitCategory V G} (a : Wires V (X₁.obj + X₂.obj)) (j : Fin Y₁.obj) (f : X₁ Y₁) (g : X₂ Y₂) :
              Vector.get (tensorHomVal f g a) (Fin.castAdd Y₂.obj j) = Vector.get (f (Vector.ofFn fun (i : Fin X₁.obj) => Vector.get a (Fin.castAdd X₂.obj i))) j
              theorem Circuit.CombinationalCircuitCategory.tensorHom_eq_right {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ Y₁ X₂ Y₂ : CombinationalCircuitCategory V G} (a : Wires V (X₁.obj + X₂.obj)) (j : Fin Y₂.obj) (f : X₁ Y₁) (g : X₂ Y₂) :
              Vector.get (tensorHomVal f g a) (Fin.natAdd Y₁.obj j) = Vector.get (g (Vector.ofFn fun (i : Fin X₂.obj) => Vector.get a (Fin.natAdd X₁.obj i))) j
              theorem Circuit.CombinationalCircuitCategory.tensorHom_get {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ Y₁ X₂ Y₂ : CombinationalCircuitCategory V G} (f : X₁ Y₁) (g : X₂ Y₂) (w : Wires V (X₁.obj + X₂.obj)) (i : Fin (Y₁.obj + Y₂.obj)) :
              Vector.get (tensorHomVal f g w) i = if h : i < Y₁.obj then Vector.get (f (Vector.ofFn fun (k : Fin X₁.obj) => Vector.get w (Fin.castAdd X₂.obj k))) i, h else Vector.get (g (Vector.ofFn fun (k : Fin X₂.obj) => Vector.get w (Fin.natAdd X₁.obj k))) i - Y₁.obj,
              @[simp]
              theorem Circuit.CombinationalCircuitCategory.tensorHom_monotone {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ Y₁ X₂ Y₂ : CombinationalCircuitCategory V G} (f : X₁ Y₁) (g : X₂ Y₂) :
              @[reducible, inline]
              abbrev Circuit.CombinationalCircuitCategory.tensorHom {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ Y₁ X₂ Y₂ : CombinationalCircuitCategory V G} (f : X₁ Y₁) (g : X₂ Y₂) :
              X₁.tensorObj X₂ Y₁.tensorObj Y₂

              The monoidal product of two morphisms.

              Equations
              Instances For
                @[reducible, inline]
                abbrev Circuit.CombinationalCircuitCategory.isoHomVal {V : Type v} {n m : } (h : n = m) :
                Wires V nWires V m

                The underlying wire-function of the forward direction of a wire-count isomorphism.

                Equations
                Instances For
                  @[reducible, inline]
                  abbrev Circuit.CombinationalCircuitCategory.isoHom {V : Type v} [SemilatticeSup V] {n m : } (h : n = m) :
                  { f : Wires V nWires V m // Monotone f }

                  The forward direction of a wire-count isomorphism.

                  Equations
                  Instances For
                    @[reducible, inline]
                    abbrev Circuit.CombinationalCircuitCategory.isoInvVal {V : Type v} {n m : } (h : n = m) :
                    Wires V mWires V n

                    The underlying wire-function of the inverse direction of a wire-count isomorphism.

                    Equations
                    Instances For
                      @[reducible, inline]
                      abbrev Circuit.CombinationalCircuitCategory.isoInv {V : Type v} [SemilatticeSup V] {n m : } (h : n = m) :
                      { f : Wires V mWires V n // Monotone f }

                      The inverse direction of a wire-count isomorphism.

                      Equations
                      Instances For
                        @[inline]
                        def Circuit.CombinationalCircuitCategory.iso {V : Type v} {G : Type u} [SemilatticeSup V] {n m : } (h : n = m) :
                        { obj := n } { obj := m }

                        The isomorphism between objects with equal wire counts.

                        Equations
                        Instances For
                          @[reducible, inline]

                          Left whiskering of a morphism by a fixed object.

                          Equations
                          Instances For
                            @[reducible, inline]

                            Right whiskering of a morphism by a fixed object.

                            Equations
                            Instances For
                              @[simp]
                              theorem Circuit.CombinationalCircuitCategory.tensorHom_comp_tensorHom {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ Y₁ Z₁ X₂ Y₂ Z₂ : CombinationalCircuitCategory V G} (f₁ : X₁ Y₁) (f₂ : X₂ Y₂) (g₁ : Y₁ Z₁) (g₂ : Y₂ Z₂) :
                              @[inline]

                              The monoidal unit, the object with no wires.

                              Equations
                              Instances For
                                @[inline]

                                The associator isomorphism of the monoidal structure.

                                Equations
                                Instances For
                                  theorem Circuit.CombinationalCircuitCategory.associator_naturality {V : Type v} {G : Type u} [SemilatticeSup V] {X₁ X₂ X₃ Y₁ Y₂ Y₃ : CombinationalCircuitCategory V G} (f₁ : X₁ Y₁) (f₂ : X₂ Y₂) (f₃ : X₃ Y₃) :
                                  @[reducible, inline]

                                  The left unitor isomorphism of the monoidal structure.

                                  Equations
                                  Instances For
                                    @[reducible, inline]

                                    The right unitor isomorphism of the monoidal structure.

                                    Equations
                                    Instances For
                                      @[implicit_reducible, inline]
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      @[reducible, inline]

                                      The underlying wire-function of the braiding, swapping two blocks of wires.

                                      Equations
                                      Instances For
                                        @[inline]

                                        The braiding isomorphism of the symmetric monoidal structure.

                                        Equations
                                        Instances For
                                          @[implicit_reducible, inline]
                                          Equations
                                          • One or more equations did not get rendered due to their size.