Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added FinWeak (isomorphic to Fin) #867

Merged
merged 13 commits into from
Aug 28, 2022
Merged

Conversation

guilhermehas
Copy link
Contributor

I created a new data structure FinWeak and I proved that it is isomorphic to Fin.

data FinPure : Type where
  zero : FinPure 1
  suc : FinPure n  FinPure (suc n)

data Fin : Type where
  pure : FinPure n  Fin n
  weaken : Fin n  Fin (suc n)

It can be useful if it is necessary to know how far Fin n is from n.

Copy link
Collaborator

@felixwellen felixwellen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
I only have minor comments.

Cubical/Data/FinWeak/Base.agda Show resolved Hide resolved
Cubical/Data/FinWeak/Base.agda Outdated Show resolved Hide resolved
Cubical/Data/FinWeak/Properties.agda Show resolved Hide resolved
Cubical/Data/FinWeak/Properties.agda Outdated Show resolved Hide resolved
Cubical/Data/FinWeak/Properties.agda Outdated Show resolved Hide resolved
Cubical/Data/FinWeak/Base.agda Outdated Show resolved Hide resolved
Cubical/Data/FinWeak/Properties.agda Outdated Show resolved Hide resolved
Cubical/Data/FinWeak/Properties.agda Outdated Show resolved Hide resolved
Copy link
Collaborator

@felixwellen felixwellen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it is clear to me, how this can be useful - many thanks!

Cubical/Data/FinWeak/Base.agda Outdated Show resolved Hide resolved
Cubical/Data/FinWeak/Base.agda Outdated Show resolved Hide resolved
Copy link
Collaborator

@felixwellen felixwellen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to be merged from my point of view.

@felixwellen felixwellen merged commit a060592 into agda:master Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants