Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Commit

Permalink
prove foldIRT/unfoldIRT isomorphism
Browse files Browse the repository at this point in the history
  • Loading branch information
m-yac committed Feb 25, 2021
1 parent da0f8fd commit 7e098d5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions saw-core-coq/coq/handwritten/CryptolToCoq/SAWCorePreludeExtra.v
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,13 @@ Proof.
intuition.
}
Qed.

Theorem fold_unfold_IRT As Ds D : forall x, foldIRT As Ds D (unfoldIRT As Ds D x) = x.
Proof.
induction x; simpl; unfold uncurry; now f_equal.
Qed.

Theorem unfold_fold_IRT As Ds D : forall u, unfoldIRT As Ds D (foldIRT As Ds D u) = u.
Proof.
revert Ds; induction D; try destruct u; simpl; now f_equal.
Qed.

0 comments on commit 7e098d5

Please sign in to comment.