Documentation

Validator.Basic

theorem Array.lt_of_getElem?_eq_some {α : Type u_1} {a : α} {xs : Array α} {i : } (h : xs[i]? = some a) :
i < xs.size
@[simp]
theorem Fintype.elems_eq_univ {α : Type u_1} [h : Fintype α] :
def Vector.elems {α : Type u_1} [h : Fintype α] [DecidableEq α] (n : ) :
Finset (Vector α n)
Equations
Instances For
    def List.productWith {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : αβγ) (as : List α) (bs : List β) :
    List γ

    Combine every element of the first list with every element of the second list using the function f.

    Equations
    Instances For
      def List.mulr {α : Type u_1} {β : Type u_2} (f : αββ) (init : β) :
      List (List α)List β

      Use foldr to combine any element of the first list with any element of the second list, the third list, etc. Note that the size of the result is exponential in the number of lists.

      Equations
      Instances For
        def List.multiply {α : Type u_1} :
        List (List (List α))List (List α)
        Equations
        Instances For
          @[simp]
          theorem List.multiply_nil {α : Type u_1} :
          @[simp]
          theorem List.multiply_cons {α : Type u_1} {asss : List (List (List α))} {ass : List (List α)} :
          (ass :: asss).multiply = flatMap (fun (as : List α) => map (fun (x : List α) => as ++ x) asss.multiply) ass
          @[irreducible]
          def List.mergeDedup {α : Type u_1} [Ord α] (xs ys : List α) :
          List α

          Similar to List.merge, but also remove duplicates. I tried to combine List.merge with List.dedup, but there are no lemmas for List.dedup with sorted. There is also Array.mergeDedup, but that also has no lemmas.

          Equations
          Instances For
            theorem List.mem_mergeDedup {α : Type u_1} [LinearOrder α] {xs ys : List α} {a : α} :
            a xs.mergeDedup ys a xs a ys
            theorem List.mergeDedup_sorted {α : Type u_1} [LinearOrder α] {xs ys : List α} :
            xs.SortedLTys.SortedLT(xs.mergeDedup ys).SortedLT
            def List.insertDedup {α : Type u_1} [Ord α] (xs : List α) (x : α) :
            List α
            Equations
            Instances For
              theorem List.mem_insertDedup {α : Type u_1} [LinearOrder α] {xs : List α} {x a : α} :
              a xs.insertDedup x a xs a = x
              theorem List.insertDedup_sorted {α : Type u_1} [LinearOrder α] {xs : List α} {x : α} :
              @[irreducible]
              def List.diff' {α : Type u_1} [Ord α] (xs ys : List α) :
              List α
              Equations
              Instances For
                theorem List.mem_diff' {α : Type u_1} [LinearOrder α] {xs ys : List α} (h1 : xs.SortedLT) (h2 : ys.SortedLT) (a : α) :
                a xs.diff' ys a xs ays
                theorem List.diff'_sorted {α : Type u_1} [LinearOrder α] {xs ys : List α} :
                xs.SortedLTys.SortedLT(xs.diff' ys).SortedLT
                theorem List.map_toFinset {α : Type u_1} {β : Type u_2} [DecidableEq α] [DecidableEq β] {f : αβ} {xs : List α} :
                theorem List.length_flatten_short {α : Type u_1} (ass : List (List α)) (h : asass, as.length < 2) :
                @[simp]
                theorem Set.inter_compl_subset_union_compl {α : Type u_1} {s1 s2 s3 s4 : Set α} :
                s1 s2 s3 s4 s1 s4 s3 s2