I am a beginner Coq user.
While it is satisfying that the computer verified the proof for me, proofs that satisfy Coq are notoriously difficult to read for humans. Here is a simple example, imagine you don't see any of the comments:
Theorem add_comm : forall n m : nat,
n + m = m + n.
Proof.
intros n m.
induction m as [|m Hm].
- (* n + 0 = 0 + n *)
simpl. (* n + 0 = n *)
apply add_0_r. (* *)
- (* n + S m = S m + n *)
simpl. (* n + S m = S (m + n) *)
rewrite <- Hm. (* n + S m = S (n + m) *)
rewrite <- plus_n_Sm. (* S (n + m) = S (n + m) *)
reflexivity. (* *)
Qed.
I honestly cannot read the proof without the comments, even less so if I want to show it to audiences who don't know about Coq.
Writing these comments manually is tedious, and Coq generates them anyway. I wonder if Coq can simply automatically annotate my proof so to make it more readable?