Documentation

Hale.Base.Data.Functor.Identity

structure Data.Functor.Identity (α : Type u) :

The identity functor. Identity α is isomorphic to α.

  • runIdentity : α
Instances For
    def Data.Functor.instBEqIdentity.beq {α✝ : Type u_1} [BEq α✝] :
    Identity α✝ → Identity α✝ → Bool
    Equations
    Instances For
      @[implicit_reducible]
      instance Data.Functor.instBEqIdentity {α✝ : Type u_1} [BEq α✝] :
      BEq (Identity α✝)
      Equations
      def Data.Functor.instOrdIdentity.ord {α✝ : Type u_1} [Ord α✝] :
      Identity α✝ → Identity α✝ → Ordering
      Equations
      Instances For
        @[implicit_reducible]
        instance Data.Functor.instOrdIdentity {α✝ : Type u_1} [Ord α✝] :
        Ord (Identity α✝)
        Equations
        def Data.Functor.instReprIdentity.repr {α✝ : Type u_1} [Repr α✝] :
        Identity α✝ → Nat → Std.Format
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[implicit_reducible]
          instance Data.Functor.instReprIdentity {α✝ : Type u_1} [Repr α✝] :
          Repr (Identity α✝)
          Equations
          Equations
          Instances For
            @[implicit_reducible]
            Equations
            @[implicit_reducible]
            Equations
            @[implicit_reducible]
            Equations
            @[implicit_reducible]
            Equations
            @[implicit_reducible]
            Equations
            • One or more equations did not get rendered due to their size.
            @[implicit_reducible]
            Equations
            • One or more equations did not get rendered due to their size.
            theorem Data.Functor.Identity.map_id {α : Type u_1} (x : Identity α) :
            id <$> x = x
            theorem Data.Functor.Identity.map_comp {β γ α : Type u_1} (f : β → γ) (g : α → β) (x : Identity α) :
            (f ∘ g) <$> x = f <$> g <$> x
            theorem Data.Functor.Identity.pure_bind {α β : Type u_1} (a : α) (f : α → Identity β) :
            pure a >>= f = f a
            theorem Data.Functor.Identity.bind_pure {α : Type u_1} (x : Identity α) :
            x >>= pure = x
            theorem Data.Functor.Identity.bind_assoc {α β γ : Type u_1} (x : Identity α) (f : α → Identity β) (g : β → Identity γ) :
            x >>= f >>= g = x >>= fun (a : α) => f a >>= g