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

Make `nat_cancel` comments Coqdoc.

parent fc7ddaf7
No related branches found
No related tags found
No related merge requests found
Pipeline #
From stdpp Require Import numbers. From stdpp Require Import numbers.
(* The class [NatCancel m n m' n'] is a simple canceler for natural numbers (** The class [NatCancel m n m' n'] is a simple canceler for natural numbers
implemented using type classes. implemented using type classes.
Input: [m], [n]; output: [m'], [n']. Input: [m], [n]; output: [m'], [n'].
...@@ -71,7 +71,7 @@ Global Instance nat_cancel_leaf_S_else m n m' n' : ...@@ -71,7 +71,7 @@ Global Instance nat_cancel_leaf_S_else m n m' n' :
NatCancelLeaf m n m' n' NatCancelLeaf m (S n) m' (S n') | 4. NatCancelLeaf m n m' n' NatCancelLeaf m (S n) m' (S n') | 4.
Proof. unfold NatCancelLeaf, NatCancel. omega. Qed. Proof. unfold NatCancelLeaf, NatCancel. omega. Qed.
(* The instance [nat_cancel_S_both] is redundant, but may reduce proof search (** The instance [nat_cancel_S_both] is redundant, but may reduce proof search
quite a bit, e.g. when canceling constants in constants. *) quite a bit, e.g. when canceling constants in constants. *)
Global Instance nat_cancel_S_both m n m' n' : Global Instance nat_cancel_S_both m n m' n' :
NatCancel m n m' n' NatCancel (S m) (S n) m' n' | 1. NatCancel m n m' n' NatCancel (S m) (S n) m' n' | 1.
...@@ -83,4 +83,4 @@ Proof. unfold NatCancel, MakeNatPlus. omega. Qed. ...@@ -83,4 +83,4 @@ Proof. unfold NatCancel, MakeNatPlus. omega. Qed.
Global Instance nat_cancel_S m m' m'' Sm' n n' n'' : Global Instance nat_cancel_S m m' m'' Sm' n n' n'' :
NatCancel m n m' n' NatCancelLeaf 1 n' m'' n'' NatCancel m n m' n' NatCancelLeaf 1 n' m'' n''
MakeNatS m'' m' Sm' NatCancel (S m) n Sm' n'' | 3. MakeNatS m'' m' Sm' NatCancel (S m) n Sm' n'' | 3.
Proof. unfold NatCancelLeaf, NatCancel, MakeNatS. omega. Qed. Proof. unfold NatCancelLeaf, NatCancel, MakeNatS. omega. Qed.
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment