Skip to content

Commit 95f083a

Browse files
committed
Fix comments and example
1 parent 44efa82 commit 95f083a

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

examples/int_to_Zp.v

-4
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ Definition eqmodp (x y : int) := modp x = modp y.
4545
Definition eq_Zmodp (x y : Zmodp) := (x = y).
4646
Arguments eq_Zmodp /.
4747

48-
(* Axiom (eqp_refl : Reflexive eqmodp). *)
49-
(* Axiom (eqp_sym : Symmetric eqmodp). *)
50-
(* Axiom (eqp_trans : Transitive eqmodp). *)
51-
5248
Notation "0" := zero : int_scope.
5349
Notation "0" := zerop : Zmodp_scope.
5450
Notation "x == y" := (eqmodp x%int y%int)

examples/nat_ind.v

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ Variables (to_nat : I -> nat) (of_nat : nat -> I).
2323

2424
Hypothesis to_natK : forall x, of_nat (to_nat x) = x.
2525
Hypothesis of_nat0 : of_nat O = I0.
26-
Hypothesis of_natS : forall x n, of_nat n = x -> of_nat (S n) = IS x.
26+
Hypothesis of_natS : forall n, of_nat (S n) = IS (of_nat n).
2727

28-
(* We only need/ (2a,3) which is morally that Nmap is a split injection *)
28+
(* We only need (2a,3), so it suffices that to_nat is a retraction *)
2929
Definition RI : Param2a3.Rel I nat :=
3030
SplitSurj.toParamSym (SplitSurj.Build to_natK).
3131

3232
Definition RI0 : RI I0 O. Proof. exact of_nat0. Qed.
33-
Definition RIS m n : RI m n -> RI (IS m) (S n). Proof. exact: of_natS. Qed.
33+
Definition RIS m n : RI m n -> RI (IS m) (S n).
34+
Proof. by move=> <-; apply: of_natS. Qed.
3435

3536
Trocq Use RI RI0 RIS.
3637

examples/peano_bin_nat.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ From Trocq_examples Require Import N.
1919
Set Universe Polymorphism.
2020

2121
(* the best we can do to link these types is (4,4), but
22-
we only need (2a,3) which is morally that Nmap is a split injection *)
22+
we only need (2a,3) si ut suffices that N.to_nat is a retraction *)
2323
Definition RN : Param2a3.Rel N nat :=
2424
SplitSurj.toParamSym (SplitSurj.Build N.to_natK).
2525

0 commit comments

Comments
 (0)