Skip to content

Commit

Permalink
Unary integers
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <[email protected]>

<!-- ps-id: 60011b45-5cd1-40cc-a7d3-f1d665aad8af -->
  • Loading branch information
Alizter committed May 18, 2024
1 parent 3956d68 commit 0938eee
Show file tree
Hide file tree
Showing 4 changed files with 489 additions and 4 deletions.
8 changes: 8 additions & 0 deletions theories/Basics/Decidable.v
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ Global Instance decidable_empty : Decidable Empty

(** ** Transfer along equivalences *)

Definition decidable_iff {A B} (f : A -> B) (f' : B -> A)
: Decidable A -> Decidable B.
Proof.
intros [a|na].
- exact (inl (f a)).
- exact (inr (fun b => na (f' b))).
Defined.

Definition decidable_equiv (A : Type) {B : Type} (f : A -> B) `{IsEquiv A B f}
: Decidable A -> Decidable B.
Proof.
Expand Down
Loading

0 comments on commit 0938eee

Please sign in to comment.