Documentation

Init.Data.Hashable

instance instHashableProd {α : Type u_1} {β : Type u_2} [Hashable α] [Hashable β] :
Hashable (α × β)
Equations
    instance instHashableOption {α : Type u_1} [Hashable α] :
    Equations
      instance instHashableList {α : Type u_1} [Hashable α] :
      Equations
        instance instHashableArray {α : Type u_1} [Hashable α] :
        Equations
          instance instHashableFin {n : Nat} :
          Equations
            instance instHashable (P : Prop) :
            Equations
              @[inline]
              def hash64 (u : UInt64) :

              An opaque (low-level) hash operation used to implement hashing for pointers.

              Equations
                Instances For
                  class LawfulHashable (α : Type u) [BEq α] [Hashable α] :

                  The BEq α and Hashable α instances on α are compatible. This means that that a == b implies hash a = hash b.

                  This is automatic if the BEq instance is lawful.

                  • hash_eq (a b : α) : (a == b) = truehash a = hash b

                    If a == b, then hash a = hash b.

                  Instances
                    theorem hash_eq {α : Type u_1} [BEq α] [Hashable α] [LawfulHashable α] {a b : α} :
                    (a == b) = truehash a = hash b

                    A lawful hash function respects its Boolean equality test.

                    @[instance 100]