Documentation

Comparse.Formats.Derived

def Comparse.NonExtensibleMessageFormat.isomorphic {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : NonExtensibleMessageFormat Bytes a) (f : ab) (g : ba) :
Equations
Instances For
    class Comparse.LeftInverse {b : Sort u_1} {a : Sort u_2} (g : ba) (f : ab) :
    Instances
      class Comparse.RightInverse {b : Sort u_1} {a : Sort u_2} (g : ba) (f : ab) :
      Instances
        instance Comparse.NonExtensibleMessageFormat.isomorphic.instParseConsumes {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : NonExtensibleMessageFormat Bytes a) (f : ab) (g : ba) [mf.ParseConsumes] :
        @[simp]
        theorem Comparse.NonExtensibleMessageFormat.isomorphic.wf_eq {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : NonExtensibleMessageFormat Bytes a) (f : ab) (g : ba) (pred : BytesProp) [BytesCompatiblePred pred] (x : b) :
        (mf.isomorphic f g).wf pred x = mf.wf pred (g x)
        instance Comparse.NonExtensibleMessageFormat.triviallyIsomorphic.instIsNonAmbiguous {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : NonExtensibleMessageFormat Bytes a) (f : ab) (g : ba) (h_left : Function.LeftInverse g f) (h_right : Function.RightInverse g f) [mf.IsNonAmbiguous] :
        (mf.triviallyIsomorphic f g h_left h_right).IsNonAmbiguous
        instance Comparse.NonExtensibleMessageFormat.triviallyIsomorphic.instParseConsumes {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : NonExtensibleMessageFormat Bytes a) (f : ab) (g : ba) (h_left : Function.LeftInverse g f) (h_right : Function.RightInverse g f) [mf.ParseConsumes] :
        (mf.triviallyIsomorphic f g h_left h_right).ParseConsumes
        @[simp]
        theorem Comparse.NonExtensibleMessageFormat.triviallyIsomorphic.wf_eq {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : NonExtensibleMessageFormat Bytes a) (f : ab) (g : ba) (h_left : Function.LeftInverse g f) (h_right : Function.RightInverse g f) (pred : BytesProp) [BytesCompatiblePred pred] (x : b) :
        (mf.triviallyIsomorphic f g h_left h_right).wf pred x = mf.wf pred (g x)
        def Comparse.ExtensibleMessageFormat.isomorphic {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : ExtensibleMessageFormat Bytes a) (f : ab) (g : ba) :
        Equations
        Instances For
          @[simp]
          theorem Comparse.ExtensibleMessageFormat.isomorphic.wf_eq {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : ExtensibleMessageFormat Bytes a) (f : ab) (g : ba) (pred : BytesProp) [BytesCompatiblePred pred] (x : b) :
          (mf.isomorphic f g).wf pred x = mf.wf pred (g x)
          instance Comparse.ExtensibleMessageFormat.triviallyIsomorphic.instIsNonAmbiguous {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : ExtensibleMessageFormat Bytes a) (f : ab) (g : ba) (h_left : Function.LeftInverse g f) (h_right : Function.RightInverse g f) [mf.IsNonAmbiguous] :
          (mf.triviallyIsomorphic f g h_left h_right).IsNonAmbiguous
          @[simp]
          theorem Comparse.ExtensibleMessageFormat.triviallyIsomorphic.wf_eq {Bytes : Type} [BytesLike Bytes] {a b : Type} (mf : ExtensibleMessageFormat Bytes a) (f : ab) (g : ba) (h_left : Function.LeftInverse g f) (h_right : Function.RightInverse g f) (pred : BytesProp) [BytesCompatiblePred pred] (x : b) :
          (mf.triviallyIsomorphic f g h_left h_right).wf pred x = mf.wf pred (g x)
          @[simp]
          theorem Comparse.NonExtensibleMessageFormat.subtype.wf_eq {Bytes : Type} [BytesLike Bytes] {a : Type} (mf : NonExtensibleMessageFormat Bytes a) (p : aProp) [DecidablePred p] (pred : BytesProp) [BytesCompatiblePred pred] (x : Subtype p) :
          (mf.subtype p).wf pred x = mf.wf pred x.val
          @[simp]
          theorem Comparse.ExtensibleMessageFormat.subtype.wf_eq {Bytes : Type} [BytesLike Bytes] {a : Type} (mf : ExtensibleMessageFormat Bytes a) (p : aProp) [DecidablePred p] (pred : BytesProp) [BytesCompatiblePred pred] (x : Subtype p) :
          (mf.subtype p).wf pred x = mf.wf pred x.val
          @[simp]
          theorem Comparse.NonExtensibleMessageFormat.prod.wf_eq {Bytes : Type} [BytesLike Bytes] {a b : Type} (mfa : NonExtensibleMessageFormat Bytes a) (mfb : NonExtensibleMessageFormat Bytes b) (pred : BytesProp) [BytesCompatiblePred pred] (x : a × b) :
          (mfa.prod mfb).wf pred x = (mfa.wf pred x.fst mfb.wf pred x.snd)
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem Comparse.ExtensibleMessageFormat.prod.wf_eq {Bytes : Type} [BytesLike Bytes] {a b : Type} (mfa : NonExtensibleMessageFormat Bytes a) (mfb : ExtensibleMessageFormat Bytes b) (pred : BytesProp) [BytesCompatiblePred pred] (x : a × b) :
            (prod mfa mfb).wf pred x = (mfa.wf pred x.fst mfb.wf pred x.snd)
            @[simp]
            theorem Comparse.ExtensibleMessageFormat.byteArray.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : ByteArray) :
            byteArray.wf pred x
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]
              theorem Comparse.ExtensibleMessageFormat.string.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : String) :
              string.wf pred x
              @[simp]
              theorem Comparse.NonExtensibleMessageFormat.fixedLengthBytes.wf_eq {Bytes : Type} [BytesLike Bytes] (len : Nat) (pred : BytesProp) [BytesCompatiblePred pred] (x : { b : Bytes // BytesLike.length b = len }) :
              (fixedLengthBytes len).wf pred x = pred x.val
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[simp]
                theorem Comparse.NonExtensibleMessageFormat.fixedLengthByteArray.wf_eq {Bytes : Type} [BytesLike Bytes] (len : Nat) (pred : BytesProp) [BytesCompatiblePred pred] (x : { b : ByteArray // b.size = len }) :
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[simp]
                  theorem Comparse.NonExtensibleMessageFormat.bitVec.wf_eq {Bytes : Type} [BytesLike Bytes] (w : Nat) (pred : BytesProp) [BytesCompatiblePred pred] (x : BitVec (8 * w)) :
                  (bitVec w).wf pred x
                  @[simp]
                  theorem Comparse.NonExtensibleMessageFormat.uint8.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : UInt8) :
                  uint8.wf pred x
                  @[simp]
                  theorem Comparse.NonExtensibleMessageFormat.uint16.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : UInt16) :
                  uint16.wf pred x
                  @[simp]
                  theorem Comparse.NonExtensibleMessageFormat.uint32.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : UInt32) :
                  uint32.wf pred x
                  @[simp]
                  theorem Comparse.NonExtensibleMessageFormat.uint64.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : UInt64) :
                  uint64.wf pred x
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[simp]
                    theorem Comparse.NonExtensibleMessageFormat.fin8.wf_eq {Bytes : Type} [BytesLike Bytes] (n : Nat) (h : n 256) (pred : BytesProp) [BytesCompatiblePred pred] (x : Fin n) :
                    (fin8 n h).wf pred x
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[simp]
                      theorem Comparse.NonExtensibleMessageFormat.bool.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : Bool) :
                      bool.wf pred x
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[simp]
                        theorem Comparse.NonExtensibleMessageFormat.slowNat.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : Nat) :
                        slowNat.wf pred x
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          @[simp]
                          theorem Comparse.NonExtensibleMessageFormat.slowBytes.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : Bytes) :
                          slowBytes.wf pred x = pred x
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[simp]
                            theorem Comparse.NonExtensibleMessageFormat.slowString.wf_eq {Bytes : Type} [BytesLike Bytes] (pred : BytesProp) [BytesCompatiblePred pred] (x : String) :
                            slowString.wf pred x