Documentation

WeightedNetKAT.Listed

def List.getElem_prod {α : Type u_1} {β : Type u_2} (l₁ : List α) (l₂ : List β) (i : ) (hi : i < (l₁ ×ˢ l₂).length) :
(l₁ ×ˢ l₂)[i] = (l₁[i / l₂.length], l₂[i % l₂.length])
Equations
  • =
Instances For
    def Array.product {α : Type u_1} {β : Type u_2} (l₁ : Array α) (l₂ : Array β) :
    Array (α × β)
    Equations
    Instances For
      @[implicit_reducible]
      instance Array.instSProdProd_weightedNetKAT {α : Type u_1} {β : Type u_2} :
      SProd (Array α) (Array β) (Array (α × β))
      Equations
      theorem Array.product_eq_toList_product {α : Type u_1} {β : Type u_2} (l₁ : Array α) (l₂ : Array β) :
      (l₁ ×ˢ l₂).toList = l₁.toList ×ˢ l₂.toList
      theorem Array.mem_product_iff_mem_toList_product {α : Type u_1} {β : Type u_2} (l₁ : Array α) (l₂ : Array β) {x : α × β} :
      x l₁ ×ˢ l₂ x l₁.toList ×ˢ l₂.toList
      @[simp]
      theorem Array.mem_product {α : Type u_1} {β : Type u_2} {l₁ : Array α} {l₂ : Array β} {x : α × β} :
      x l₁ ×ˢ l₂ x.1 l₁ x.2 l₂
      @[simp]
      theorem Array.mem_product' {α : Type u_1} {β : Type u_2} {l₁ : Array α} {l₂ : Array β} {x : α × β} :
      x l₁.product l₂ x.1 l₁ x.2 l₂
      @[simp]
      theorem Array.pair_mem_product {α : Type u_1} {β : Type u_2} {l₁ : Array α} {l₂ : Array β} {x : α} {y : β} :
      (x, y) l₁ ×ˢ l₂ x l₁ y l₂
      @[simp]
      def Array.size_product {α : Type u_1} {β : Type u_2} {l₁ : Array α} {l₂ : Array β} :
      (l₁ ×ˢ l₂).size = l₁.size * l₂.size
      Equations
      • =
      Instances For
        @[simp]
        def Array.getElem_product {α : Type u_1} {β : Type u_2} {l₁ : Array α} {l₂ : Array β} {i : } (hi : i < (l₁ ×ˢ l₂).size) :
        (l₁ ×ˢ l₂)[i] = (l₁[i / l₂.size], l₂[i % l₂.size])
        Equations
        • =
        Instances For
          def Array.Nodup {α : Type u_1} (l : Array α) :
          Equations
          Instances For
            @[simp]
            theorem Array.nodup_empty {α : Type u_1} :
            @[simp]
            theorem Array.nodup_singleton {α : Type u_1} {a : α} :
            @[simp]
            theorem Array.nodup_pair {α : Type u_1} {a b : α} :
            #[a, b].Nodup a b
            def Array.Nodup.product {α : Type u_1} {β : Type u_2} {l₁ : Array α} {l₂ : Array β} (d₁ : l₁.Nodup) (d₂ : l₂.Nodup) :
            (l₁ ×ˢ l₂).Nodup
            Equations
            • =
            Instances For
              theorem Array.nodup_append {α : Type u_1} {l₁ l₂ : Array α} :
              (l₁ ++ l₂).Nodup l₁.Nodup l₂.Nodup al₁, bl₂, a b
              theorem Array.Nodup.map {α : Type u_1} {β : Type u_2} {l : Array α} {f : αβ} (hf : Function.Injective f) :
              l.Nodup(Array.map f l).Nodup
              @[simp]
              theorem Array.mem_finRange {n : } (a : Fin n) :
              theorem Array.nodup_map_iff_inj_on {α : Type u_1} {β : Type u_2} {f : αβ} {l : Array α} (d : l.Nodup) :
              (map f l).Nodup xl, yl, f x = f yx = y
              class Listed (α : Type u_1) :
              Type u_1
              Instances
                @[implicit_reducible]
                def Listed.ofArray {α : Type u_1} [DecidableEq α] (array : Array α) (nodup : array.Nodup) (complete : ∀ (a : α), a array) :
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[implicit_reducible]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  theorem Listed.encode_lt_size {α : Type u_1} [Listed α] (a : α) :
                  Equations
                  • =
                  Instances For
                    instance Listed.instCountable {α : Type u_1} [Listed α] :
                    @[implicit_reducible]
                    def Listed.lift {α : Type u_1} [Listed α] {γ : Type u_3} (f : α γ) :
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[simp]
                      theorem Listed.mem_list {α : Type u_1} [Listed α] (a : α) :
                      def Listed.arrayOf (α : Type u_3) [Listed α] :
                      Equations
                      Instances For
                        def Listed.listOf (α : Type u_3) [Listed α] :
                        List α
                        Equations
                        Instances For
                          @[simp]
                          theorem Listed.mem_arrayOf {α : Type u_1} [Listed α] (a : α) :
                          @[simp]
                          theorem Listed.mem_listOf {α : Type u_1} [Listed α] (a : α) :
                          a listOf α
                          @[inline, specialize #[]]
                          def Listed.decode {α : Type u_1} [Listed α] (i : ) :
                          Equations
                          Instances For
                            @[simp]
                            theorem Listed.encode_decode {α : Type u_1} [Listed α] (a : α) :
                            theorem Listed.decode_eq_some {α : Type u_1} [Listed α] (n : ) (a : α) :
                            @[simp]
                            theorem Listed.decode_get_encode {α : Type u_1} [Listed α] (n : ) (h : (decode n).isSome = true) :
                            encode ((decode n).get h) = n
                            @[inline, specialize #[]]
                            def Listed.encodeFin {α : Type u_3} [i : Listed α] :
                            αFin (size α)
                            Equations
                            Instances For
                              @[inline, specialize #[]]
                              def Listed.decodeFin {α : Type u_3} [i : Listed α] :
                              Fin (size α)α
                              Equations
                              Instances For
                                @[simp]
                                theorem Listed.decodeFin_encodeFin {α : Type u_3} [i : Listed α] (a : Fin (size α)) :
                                @[simp]
                                theorem Listed.encodeFin_decodeFin {α : Type u_3} [i : Listed α] (a : α) :
                                def Listed.equivFin {α : Type u_3} [Listed α] :
                                α Fin (size α)
                                Equations
                                Instances For
                                  Equations
                                  • =
                                  Instances For
                                    Equations
                                    • =
                                    Instances For
                                      Equations
                                      • =
                                      Instances For
                                        @[simp]
                                        theorem Listed.encode_eq_iff {α : Type u_3} [Listed α] {a b : α} :
                                        encode a = encode b a = b
                                        @[simp]
                                        theorem Listed.encodeFin_eq_iff {α : Type u_3} [Listed α] {a b : α} :
                                        @[simp]
                                        theorem Listed.encodeFin_eq_encode_iff {α : Type u_3} [Listed α] {a b : α} :
                                        (encodeFin a) = encode b a = b
                                        @[simp]
                                        theorem Listed.encode_eq_encodeFin_iff {α : Type u_3} [Listed α] {a b : α} :
                                        encode a = (encodeFin b) a = b
                                        @[implicit_reducible]
                                        def Listed.decidableEq {α : Type u_1} [Listed α] :
                                        Equations
                                        Instances For
                                          @[implicit_reducible]
                                          def Listed.fintype {α : Type u_1} [Listed α] :
                                          Equations
                                          Instances For
                                            @[implicit_reducible]
                                            instance Listed.instProd {α : Type u_1} {β : Type u_2} [Listed α] [Listed β] :
                                            Listed (α × β)
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            @[implicit_reducible]
                                            instance Listed.instSum {α : Type u_1} {β : Type u_2} [Listed α] [Listed β] :
                                            Listed (α β)
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            inductive Listed.T :
                                            • a : T
                                            • b : T
                                            • c : T
                                            • d : T
                                            Instances For
                                              @[implicit_reducible]
                                              Equations
                                              Equations
                                              Instances For
                                                @[implicit_reducible]
                                                Equations
                                                @[implicit_reducible]
                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                @[implicit_reducible]
                                                instance Listed.instFin {n : } :
                                                Equations
                                                • Listed.instFin = { array := Array.finRange n, nodup := , size := n, size_prop := , complete := , encode := fun (a : Fin n) => a, encode_len := , encode_prop := }
                                                @[simp]
                                                theorem Listed.fin_size {n : } :
                                                size (Fin n) = n
                                                @[simp]
                                                theorem Listed.fin_size' {n : } :
                                                @[implicit_reducible]
                                                def Listed.ofEquiv {α : Type u_3} {β : Type u_4} [i : Listed α] (e : α β) :
                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  @[simp]
                                                  @[simp]
                                                  @[simp]
                                                  theorem Listed.sum_fin {α : Type u_3} [Listed α] [Fintype α] {𝒮 : Type u_4} [AddCommMonoid 𝒮] {f : Fin (size α)𝒮} :
                                                  i : Fin (size α), f i = i : α, f (encodeFin i)
                                                  @[simp]
                                                  theorem Listed.size_isEmpty {α : Type u_3} [Listed α] [Subsingleton α] [i : IsEmpty α] :
                                                  size α = 0
                                                  @[simp]
                                                  theorem Listed.size_subsingleton_nonempty {α : Type u_3} [Listed α] [ss : Subsingleton α] [i : Nonempty α] :
                                                  size α = 1
                                                  @[simp]
                                                  theorem Listed.size_unique {α : Type u_3} [Listed α] [i : Unique α] :
                                                  size α = 1
                                                  theorem Listed.size_subsingleton {α : Type u_3} [Listed α] [i : Subsingleton α] :
                                                  size α 1
                                                  @[simp]
                                                  theorem Listed.encodeFin_subsingleton {α : Type u_3} [Listed α] [Subsingleton α] (a : α) :
                                                  @[simp]
                                                  theorem Listed.encode_subsingleton {α : Type u_3} [Listed α] [Subsingleton α] (a : α) :
                                                  encode a = 0