Skip to content

is_isomorphic_to should be named is_alpha_equivalent #59

Description

@vchakhno

Hello!

While browsing the sources, I came across the function is_isomorphic_to.
Turns out this function only tests the alpha-equivalence of two terms.

This function name is misleading: there exist terms that are isomorphic but not alpha-equivalent, such as the combinators for true and false. For such terms, that function returns false, when according to the name it should return true. Testing if two terms are isomorphic is a much harder problem than checking if they are alpha equivalent.

It seems to me like a misnomer and not a proper use of the term isomorphic. Mathematically, two objects A and B are said to be isomorphic if there exist a function from f: A -> B and its inverse g: B -> A such that f ∘ g = id_A and g ∘ f = id_B. That definition applies to a lot of lambda terms that are not alpha-equivalent.

I doubt this is something that actually trips up people, nor do I expect any change to the API, I just wanted to report it in case there ever is a new version, and to have eventual feedback as to why that function was named in this way.

Have a good day :D

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions