Metamath Proof Explorer


Theorem dvdsgcdidd

Description: The greatest common divisor of a positive integer and another integer it divides is itself. (Contributed by Rohan Ridenour, 3-Aug-2023)

Ref Expression
Hypotheses dvdsgcdidd.1 φM
dvdsgcdidd.2 φN
dvdsgcdidd.3 φMN
Assertion dvdsgcdidd φMgcdN=M

Proof

Step Hyp Ref Expression
1 dvdsgcdidd.1 φM
2 dvdsgcdidd.2 φN
3 dvdsgcdidd.3 φMN
4 2 zcnd φN
5 1 nncnd φM
6 1 nnne0d φM0
7 4 5 6 divcan1d φNM M=N
8 7 oveq2d φMgcdNM M=MgcdN
9 1 nnnn0d φM0
10 1 nnzd φM
11 dvdsval2 MM0NMNNM
12 10 6 2 11 syl3anc φMNNM
13 3 12 mpbid φNM
14 9 13 gcdmultipled φMgcdNM M=M
15 8 14 eqtr3d φMgcdN=M