Documentation

WeightedNetKAT.ListExt

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def List.rep {α : Type u_1} (l : List α) :
        List α
        Equations
        Instances For
          @[simp]
          theorem List.repeat_zero {α : Type u_1} (l : List α) :
          l.rep 0 = []
          @[simp]
          theorem List.repeat_one {α : Type u_1} (l : List α) :
          l.rep 1 = l
          @[simp]
          theorem List.repeat_succ {α : Type u_1} (l : List α) {n : } :
          l.rep (n + 1) = l ++ l.rep n
          @[simp]
          theorem List.take_length_succ {α : Type} (A : List α) :
          A[..A + 1] = A

          Products #

          @[simp]
          theorem List.product_length {α : Type u_1} {β : Type u_2} {as : List α} {bs : List β} :
          def List.products {α : Type u_1} :
          List (List α)List (List α)
          Equations
          Instances For
            @[simp]
            theorem List.products_nil {α : Type u_1} :
            @[simp]
            theorem List.products_length {α : Type u_1} {xs : List (List α)} :
            @[simp]
            theorem List.mem_products_length {α : Type u_1} {xs : List (List α)} {x : List α} (h : x xs.products) :
            @[simp]
            theorem List.products_eq_nil {α : Type u_1} {xs : List (List α)} :
            theorem List.mem_products {α : Type u_1} {xs : List (List α)} {x : List α} :
            x xs.products x = xs ∀ (i : ) (h : i < x) (h' : i < xs), x[i] xs[i]
            theorem List.singleton_product {α : Type u_1} {β : Type u_3} {l : List β} {a : α} :
            [a].product l = map (fun (x : β) => (a, x)) l
            theorem List.product_singleton {α : Type u_1} {β : Type u_3} {l : List β} {a : α} :
            l.product [a] = map (fun (x : β) => (x, a)) l
            theorem List.products_append {α : Type u_1} {xs ys : List (List α)} :
            (xs ++ ys).products = map (fun (x : List α × List α) => match x with | (x, y) => x ++ y) (xs.products.product ys.products)

            Partitions #

            def List.partitions {α : Type u_1} [DecidableEq α] (xs : List α) :
            Equations
            Instances For
              @[simp]
              theorem List.mem_partitions_iff {α : Type u_1} [DecidableEq α] {xs : List α} {ys : List (List α)} :
              ys xs.partitions ys.flatten = xs yys, y []
              @[simp]
              theorem List.nil_mem_partitions {α : Type u_1} [DecidableEq α] {xs : List α} :
              theorem List.partitions_cons_eq_split {α : Type u_2} {𝒮 : Type u_3} [NonUnitalSemiring 𝒮] [DecidableEq α] {x : α} {xs : List α} {f : List (List α)𝒮} :
              ys(x :: xs).partitions, f ys = i..=xs, pxs[i..].partitions, f ((x :: xs[..i]) :: p)
              theorem List.mem_products' {α : Type u_2} {x : List α} {xs : List (List α)} [Inhabited α] :
              x xs.products x = xs i < xs, x[i]! xs[i]!
              def List.partitions' {α : Type u_1} [DecidableEq α] (xs : List α) (n : ) :
              Equations
              Instances For
                @[simp]
                theorem List.partitions'_nil {α : Type u_1} [DecidableEq α] {n : } :
                theorem List.partitions_eq_partitions' {α : Type u_1} [DecidableEq α] {xs : List α} {n : } :
                xs.partitions = Finset.image (fun (l : List ( × List α)) => map Prod.snd l) (xs.partitions' n)
                theorem List.mem_partitions'_iff {α : Type u_1} [DecidableEq α] {xs : List α} {n : } {ys : List ( × List α)} :
                ys xs.partitions' n (map Prod.snd ys).flatten = xs ∀ (a : ) (b : List α), (a, b) ysa n ¬b = []
                def List.partitionsFill' {α : Type u_1} [DecidableEq α] (xs : List α) (n : ) :
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[irreducible]
                  def List.buckets {α : Type u_1} [DecidableEq α] (xs : List α) (n : ) :
                  Equations
                  Instances For
                    @[simp]
                    theorem List.buckets_nil {α : Type u_1} [DecidableEq α] {n : } :
                    @[simp]
                    theorem List.buckets_zero {α : Type u_1} [DecidableEq α] (xs : List α) :
                    @[simp]
                    theorem List.buckets_one {α : Type u_1} [DecidableEq α] (xs : List α) :
                    xs.buckets 1 = {[xs]}
                    theorem List.mem_buckets_iff {α : Type u_1} [DecidableEq α] (xs : List α) (n : ) {ys : List (List α)} :
                    ys xs.buckets n n 0 ys.flatten = xs ys = n
                    theorem List.sum_le {α : Type u_2} (xs : List α) (f : α) (cap : ) (h : xxs, f x cap) :
                    (map f xs).sum cap * xs
                    theorem List.le_sum {α : Type u_2} (xs : List α) (f : α) (cap : ) (h : xxs, cap f x) :
                    xs * cap (map f xs).sum
                    def List.count' (n m : ) :
                    Equations
                    Instances For
                      theorem List.count'_le {n n' m m' : } (hn : n n') (hm : m m') :
                      count' n m count' n' m'
                      def List.corep {α : Type u_2} (xs : List (List α)) :
                      Equations
                      Instances For
                        @[simp]
                        theorem List.corep_nil {α : Type u_2} :
                        @[simp]
                        theorem List.corep_mem_ne_nil {α : Type u_2} {ls : List (List α)} {x : × List α} (h : x ls.corep) :
                        ls []
                        @[simp]
                        theorem List.corep_mem_ne_nil' {α : Type u_2} {ls : List (List α)} {x : × List α} (h : x ls.corep) :
                        x.2 []
                        @[simp]
                        theorem List.corep_mem_lt {α : Type u_2} {ls : List (List α)} {x : × List α} (h : x ls.corep) :
                        x.1 < ls
                        @[simp]
                        theorem List.corep_flatten {α : Type u_2} {ls : List (List α)} :
                        @[simp]
                        theorem List.corep_replicate_nil {α : Type u_2} {i : } :
                        @[simp]
                        theorem List.corep_append_replicate_nil {α : Type u_2} {ls : List (List α)} {i : } :
                        theorem List.corep_reconstruct {α : Type u_2} {ls : List (List α)} :
                        flatMap (fun (x : × List α) => replicate x.1 [] ++ [x.2]) ls.corep ++ rtakeWhile (fun (x : List α) => decide (x = 0)) ls = ls
                        theorem List.exists_nil_tail {α : Type u_2} (xs : List (List α)) :
                        ∃ (ys : List (List α)), (∃ (x : ), ys ++ replicate x [] = xs) ∀ (h : ¬ys = []), ¬ys.getLast h = []
                        theorem List.sum_partitions'_cons {𝒮' : Type u_2} [NonUnitalSemiring 𝒮'] {ι : Type u_3} [DecidableEq ι] {x : ι} {xs : List ι} {n : } {f : List ( × List ι)𝒮'} :
                        ys(x :: xs).partitions' n, f ys = if xs = [] then i..=n, f [(i, [x])] else ysxs.partitions' n, (f ((ys.head!.1, x :: ys.head!.2) :: ys.tail) + iFinset.image (fun (j : ) => (j, [x]) :: ys) (..=n), f i)
                        theorem List.sum_partitionsFill' {𝒮' : Type u_2} [NonUnitalSemiring 𝒮'] {ι : Type u_3} [DecidableEq ι] {xs : List ι} {n : } {f : List (List ι)𝒮'} :
                        ysxs.partitionsFill' n, f ys = xxs.partitions' n, x_1..=n, f (flatMap (fun (x : × List ι) => replicate x.1 [] ++ [x.2]) x ++ replicate x_1 [])
                        theorem List.sum_partitionsFill'_cons {𝒮' : Type u_2} [NonUnitalSemiring 𝒮'] {ι : Type u_3} [DecidableEq ι] {x : ι} {xs : List ι} {n : } {f : List (List ι)𝒮'} (h : xs []) (hf : ∀ (a b : List (List ι)), f (a ++ b) = f a * f b) :
                        ys(x :: xs).partitionsFill' n, f ys = (∑ ixs.partitions' n, f (replicate i.head!.1 []) * f [x :: i.head!.2] * f (flatMap (fun (x : × List ι) => replicate x.1 [] ++ [x.2]) i.tail)) * i..=n, f (replicate i []) + i..=n, ysxs.partitionsFill' n, f (replicate i [] ++ [x] :: ys)
                        theorem List.mul_prod_mul_eq {α : Type u_2} {ι : Type u_3} [Semiring α] {xs : List ι} {a : α} {f : ια} :
                        a * (map (fun (x : ι) => f x * a) xs).prod = (map (fun (x : ι) => a * f x) xs).prod * a
                        @[simp]
                        theorem List.buckets_pairwise_disjoint {α : Type u_2} [DecidableEq α] {xs : List α} {S : Set } :
                        @[simp]
                        theorem List.buckets_succ_pairwise_disjoint {α : Type u_2} [DecidableEq α] {xs : List α} {S : Set } :
                        S.PairwiseDisjoint fun (x : ) => xs.buckets x.succ