Zulip Chat Archive

Stream: LFTCM 2024

Topic: Coq/Rocq: divand


Florent Schaffhauser (Mar 28 2024 at 09:35):

I am trying to complete the proof of Lemma divand and here's where I am at:

Lemma divand : forall (m n : nat), 2 %| n /\ 3 %| m -> 6 %| n * m .
Proof.
move=> m n. move=> H.
move: H. move=> [/dvdnP [x A] /dvdnP [y B]].
rewrite A B.
apply /dvdnP.
Admitted.

In Lean, I would carry on by writing use (x * y) and conclude by a computation.

Is there something similar to the use tactic here? Also, what would be a more idiomatic way of writing the proof?

Florent Schaffhauser (Mar 28 2024 at 09:52):

Cyril told me during the break: the Coq equivalent of use (x * y) is exists (x * y).

Comes with no guarantees, apologies if I misunderstood! :pray:

Notification Bot (Mar 28 2024 at 11:13):

2 messages were moved here from #LFTCM 2024 > Coq/Rocq tutorial and practice by Cyril Cohen.

Cyril Cohen (Mar 28 2024 at 11:16):

Flo (Florent Schaffhauser) said:

Cyril told me during the break: the Coq equivalent of use (x * y) is exists (x * y).

Comes with no guarantees, apologies if I misunderstood! :pray:

It's not strictly equivalent, use does strictly more, but that's a first good approximation.


Last updated: May 02 2025 at 03:31 UTC