Documentation

LeanPool.MicrowaveNetworks.Basic

Common microwave network components and composition #

Shared matrix definitions and finite-index facts used by both synthesis models. Adapted from formalizing-analog-computing at commit a89c1e9263658c20a29046f9ed1a8eeb867dd537.

@[reducible, inline]
abbrev MiLAC.Network (n : ℕ) :

A matched network with n inputs and n outputs, represented by its transmission scattering matrix.

Equations
Instances For

    An interconnection, directly connecting an input to an output.

    Equations
    Instances For
      noncomputable def MiLAC.phaseShifter (φ : ℝ) :

      A phase shifter with phase shift φ.

      Equations
      Instances For

        A permutation network, reordering the signals according to σ.

        Equations
        Instances For

          An interconnection is a phase shifter with zero phase.

          Series and parallel composition #

          def MiLAC.series {n : ℕ} (A B : Network n) :

          The series of two networks, where A is followed by B.

          Equations
          Instances For
            def MiLAC.parallel {n m : ℕ} (A : Network n) (B : Network m) :
            Network (n + m)

            The parallel of two networks.

            Equations
            Instances For
              @[simp]
              theorem MiLAC.castAdd_ne_natAdd {n m : ℕ} (i : Fin n) (j : Fin m) :

              The first and second blocks of a parallel network have disjoint ports.

              @[simp]
              theorem MiLAC.natAdd_ne_castAdd {n m : ℕ} (i : Fin m) (j : Fin n) :

              Disjointness of parallel ports with the two blocks interchanged.

              @[simp]
              theorem MiLAC.parallel_castAdd_castAdd {n m : ℕ} (A : Network n) (B : Network m) (i j : Fin n) :
              parallel A B (Fin.castAdd m i) (Fin.castAdd m j) = A i j

              The upper-left block of a parallel is the first network.

              @[simp]
              theorem MiLAC.parallel_castAdd_natAdd {n m : ℕ} (A : Network n) (B : Network m) (i : Fin n) (j : Fin m) :
              parallel A B (Fin.castAdd m i) (Fin.natAdd n j) = 0

              The upper-right block of a parallel is zero.

              @[simp]
              theorem MiLAC.parallel_natAdd_castAdd {n m : ℕ} (A : Network n) (B : Network m) (i : Fin m) (j : Fin n) :
              parallel A B (Fin.natAdd n i) (Fin.castAdd m j) = 0

              The lower-left block of a parallel is zero.

              @[simp]
              theorem MiLAC.parallel_natAdd_natAdd {n m : ℕ} (A : Network n) (B : Network m) (i j : Fin m) :
              parallel A B (Fin.natAdd n i) (Fin.natAdd n j) = B i j

              The lower-right block of a parallel is the second network.

              noncomputable def MiLAC.phaseDiagonal {n : ℕ} (φ : Fin n → ℝ) :

              The diagonal matrix diag(exp(j φ₁), …, exp(j φₙ)).

              Equations
              Instances For

                Phase-only implementations #

                A network implementable with interconnections, phase shifters, and permutation networks.

                Instances For

                  A diagonal matrix of phases is implementable.