Documentation

Projects.Util.Data.Word.Defs

structure Word (α : Type u_4) :
Type u_4
Instances For
    theorem Word.ext {α : Type u_4} {x y : Word α} (get? : x.get? = y.get?) :
    x = y
    theorem Word.ext_iff {α : Type u_4} {x y : Word α} :
    x = y ↔ x.get? = y.get?
    def Word.ofList {α : Type u_1} (xs : List α) :
    Word α
    Equations
    Instances For
      def Word.ofSeq {α : Type u_1} (a : ℕ → α) :
      Word α
      Equations
      Instances For
        @[instance_reducible]
        instance Word.instCoeList {α : Type u_1} :
        Coe (List α) (Word α)
        Equations
        @[instance_reducible]
        instance Word.instCoeForallNat {α : Type u_1} :
        Coe (ℕ → α) (Word α)
        Equations
        class Word.Finite {α : Type u_1} (xs : Word α) :
        Instances
          class Word.Infinite {α : Type u_1} (xs : Word α) :
          Instances
            def Word.nil {α : Type u_1} :
            Word α
            Equations
            Instances For
              @[instance_reducible]
              instance Word.instInhabited {α : Type u_1} :
              Equations
              def Word.ofGet?' {α : Type u_1} (f : ℕ → Option α) (i : ℕ) :
              Equations
              Instances For
                theorem Word.wf_ofGet?' {α : Type u_1} {f : ℕ → Option α} (i : ℕ) :
                ofGet?' f i = none → ∀ (n : ℕ), i < n → ofGet?' f n = none
                def Word.ofGet? {α : Type u_1} (f : ℕ → Option α) :
                Word α
                Equations
                Instances For
                  def Word.cons {α : Type u_1} (x : α) (xs : Word α) :
                  Word α
                  Equations
                  Instances For
                    def Word.drop {α : Type u_1} (n : ℕ) (xs : Word α) :
                    Word α
                    Equations
                    Instances For
                      def Word.tail {α : Type u_1} (xs : Word α) :
                      Word α
                      Equations
                      Instances For
                        def Word.init' {α : Type u_1} (f : ℕ → Option α) (i : ℕ) :
                        Equations
                        Instances For
                          theorem Word.wf_init' {α : Type u_1} {xs : Word α} (i : ℕ) :
                          init' xs.get? i = none → ∀ (n : ℕ), i < n → init' xs.get? n = none
                          def Word.init {α : Type u_1} (xs : Word α) :
                          Word α
                          Equations
                          Instances For
                            def Word.uncons? {α : Type u_1} (xs : Word α) :
                            Option (α × Word α)
                            Equations
                            Instances For
                              def Word.append' {α : Type u_1} (f g : ℕ → Option α) :
                              ℕ → Option α
                              Equations
                              Instances For
                                theorem Word.wf_append' {α : Type u_1} {xs ys : Word α} (i : ℕ) :
                                append' xs.get? ys.get? i = none → ∀ (n : ℕ), i < n → append' xs.get? ys.get? n = none
                                def Word.append {α : Type u_1} (xs ys : Word α) :
                                Word α
                                Equations
                                Instances For
                                  @[instance_reducible]
                                  instance Word.instAppend {α : Type u_1} :
                                  Equations
                                  noncomputable def Word.length? {α : Type u_1} (xs : Word α) :
                                  Equations
                                  Instances For
                                    def Word.take {α : Type u_1} (n : ℕ) (xs : Word α) :
                                    List α
                                    Equations
                                    Instances For
                                      noncomputable def Word.toList? {α : Type u_1} (xs : Word α) :
                                      Equations
                                      Instances For
                                        theorem Word.Finite.iff {α : Type u_1} {xs : Word α} :
                                        xs.Finite ↔ ∃ (i : ℕ), xs.get? i = none
                                        theorem Word.Infinite.iff {α : Type u_1} {xs : Word α} :
                                        xs.Infinite ↔ ∀ (i : ℕ), ∃ (x : α), xs.get? i = some x
                                        @[simp]
                                        theorem Word.not_finite_iff {α : Type u_1} {xs : Word α} :
                                        @[simp]
                                        theorem Word.not_infinite_iff {α : Type u_1} {xs : Word α} :
                                        noncomputable def Word.toSeq? {α : Type u_1} (xs : Word α) :
                                        Option (ℕ → α)
                                        Equations
                                        Instances For
                                          noncomputable def Word.flatten {α : Type u_1} (L : Word (Word α)) :
                                          Word α
                                          Equations
                                          Instances For
                                            def Word.zipWith {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : α → β → γ) (xs : Word α) (ys : Word β) :
                                            Word γ
                                            Equations
                                            Instances For
                                              def Word.cycleList {α : Type u_1} :
                                              List α → Word α
                                              Equations
                                              Instances For
                                                noncomputable def Word.cycle {α : Type u_1} (xs : Word α) :
                                                Word α
                                                Equations
                                                Instances For
                                                  noncomputable def Word.cases {α : Type u_1} (xs : Word α) :
                                                  List α ⊕ (ℕ → α)
                                                  Equations
                                                  Instances For
                                                    def Word.map {α : Type u_1} {β : Type u_2} (f : α → β) (xs : Word α) :
                                                    Word β
                                                    Equations
                                                    Instances For
                                                      noncomputable def Word.wordFun {α : Type u_1} {β : Type u_2} (p : (ℕ → α) → Prop) (f : List α → List β) (xs : Word α) :
                                                      Word β
                                                      Equations
                                                      Instances For
                                                        noncomputable def Word.mem {α : Type u_1} (xs : Word α) (x : α) :
                                                        Equations
                                                        Instances For
                                                          @[instance_reducible]
                                                          instance Word.instMembership {α : Type u_1} :
                                                          Equations
                                                          def Word.batches' {α : Type u_1} (xs : Word α) (n k : ℕ) :
                                                          Equations
                                                          Instances For
                                                            def Word.batches {α : Type u_1} (xs : Word α) (n : ℕ) :
                                                            Word (List α)
                                                            Equations
                                                            Instances For
                                                              noncomputable def Word.limit {α : Type u_1} (a : ℕ → Word α) :
                                                              Equations
                                                              Instances For
                                                                def Word.IsPrefix {α : Type u_1} (w₁ w₂ : Word α) :
                                                                Equations
                                                                Instances For
                                                                  def Word.IsInfix {α : Type u_1} (w₁ w₂ : Word α) :
                                                                  Equations
                                                                  Instances For
                                                                    noncomputable def Word.flatMap {α : Type u_1} {β : Type u_2} (w : Word α) (f : α → Word β) :
                                                                    Word β
                                                                    Equations
                                                                    Instances For