Skip to content

Add primStringFromList (primStringToList a) ≡ a #6119

@shiatsumat

Description

@shiatsumat

Currently, we can't prove that primStringToList and primStringFromList, conversions between String and List Char, are mutually inverse, although we have their injectivities, primStringToListInjective and primStringFromListInjective.

I believe this mutual inverse is useful. Can we add a primitive lemma like the following?

primStringFromToListId : ∀ a → primStringFromList (primStringToList a) ≡ a

The opposite side

primStringToFromListId : ∀ a → primStringToList (primStringFromList a) ≡ a

can be proved by combining primStringFromToListId with the injectivity primStringFromListInjective.

Or as another option, we can add both primStringFromToListId and primStringToFromListId as a primitive.
Then the injectivities primStringToListInjective and primStringFromListInjective are derivable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    builtinEnhancements to the builtin modules and builtin definitionsworkaround exists

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions