Skip to content
Snippets Groups Projects

Extend the theory of positive rationals `Qp`

Merged Robbert Krebbers requested to merge robbert/Qp into master
Files
3
+ 2
2
@@ -269,11 +269,11 @@ Qed.
@@ -269,11 +269,11 @@ Qed.
Program Instance Qp_countable : Countable Qp :=
Program Instance Qp_countable : Countable Qp :=
inj_countable
inj_countable
Qp_car
Qp_to_Qc
(λ p : Qc, guard (0 < p)%Qc as Hp; Some (mk_Qp p Hp)) _.
(λ p : Qc, guard (0 < p)%Qc as Hp; Some (mk_Qp p Hp)) _.
Next Obligation.
Next Obligation.
intros [p Hp]. unfold mguard, option_guard; simpl.
intros [p Hp]. unfold mguard, option_guard; simpl.
case_match; [|done]. f_equal. by apply Qp_eq.
case_match; [|done]. f_equal. by apply Qp_to_Qc_inj_iff.
Qed.
Qed.
Program Instance fin_countable n : Countable (fin n) :=
Program Instance fin_countable n : Countable (fin n) :=
Loading