Documentation

QuasiBorelSpaces.Rose.Encoding

@[reducible, inline]
abbrev Rose.Encoding (A : Type u_4) :
Type u_4

We derive the QuasiBorelSpace instance for Rose As from their encoding as (_ : Rose Unit) × (List ℕ → A).

Equations
Instances For
    def Rose.Encoding.mk {A : Type u_1} (x : A) (xs : List (Encoding A)) :

    The encoded version of Rose.mk.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[irreducible]
      def Rose.Encoding.fold {A : Type u_1} {B : Type u_2} (mk : AList BB) :
      Encoding AB

      The encoded version of Rose.foldr.

      Equations
      Instances For
        @[simp]
        theorem Rose.Encoding.fold_mk {A : Type u_1} {B : Type u_2} (f : AList BB) (x : A) (xs : List (Encoding A)) :
        fold f (mk x xs) = f x (List.map (fold f) xs)
        def Rose.Encoding.encode {A : Type u_1} :
        Rose AEncoding A

        Encodes a Rose A as an Encoding A.

        Equations
        Instances For
          @[simp]
          theorem Rose.Encoding.encode_mk {A : Type u_1} (x : A) (xs : List (Rose A)) :
          encode { label := x, children := xs } = mk x (List.map encode xs)