Skip to content
Snippets Groups Projects
Commit 370c0cf4 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Fix compatibility with old Coq versions.

parent 2f5854bd
No related branches found
No related tags found
No related merge requests found
...@@ -154,7 +154,7 @@ Lemma finite_bijective A `{Finite A} B `{Finite B} : ...@@ -154,7 +154,7 @@ Lemma finite_bijective A `{Finite A} B `{Finite B} :
Proof. Proof.
split. split.
- intros; destruct (proj1 (finite_inj A B)) as [f ?]; auto with lia. - intros; destruct (proj1 (finite_inj A B)) as [f ?]; auto with lia.
exists f; eauto using finite_inj_surj. exists f; split; [done|]. by apply finite_inj_surj.
- intros (f&?&?). apply (anti_symm ()); apply finite_inj. - intros (f&?&?). apply (anti_symm ()); apply finite_inj.
+ by exists f. + by exists f.
+ destruct (surj_cancel f) as (g&?). exists g. apply cancel_inj. + destruct (surj_cancel f) as (g&?). exists g. apply cancel_inj.
...@@ -274,7 +274,7 @@ Next Obligation. ...@@ -274,7 +274,7 @@ Next Obligation.
Qed. Qed.
Next Obligation. Next Obligation.
intros ?????? [x|y]; rewrite elem_of_app, !elem_of_list_fmap; intros ?????? [x|y]; rewrite elem_of_app, !elem_of_list_fmap;
eauto using elem_of_enum. [left|right]; (eexists; split; [done|apply elem_of_enum]).
Qed. Qed.
Lemma sum_card `{Finite A, Finite B} : card (A + B) = card A + card B. Lemma sum_card `{Finite A, Finite B} : card (A + B) = card A + card B.
Proof. unfold card. simpl. by rewrite app_length, !fmap_length. Qed. Proof. unfold card. simpl. by rewrite app_length, !fmap_length. Qed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment