This is an inofficial mirror of http://metamath.tirix.org for personal testing of a visualizer extension only.
Description: The greatest common divisor of six and four is two. To calculate this gcd, a simple form of Euclid's algorithm is used: ( 6 gcd 4 ) = ( ( 4 + 2 ) gcd 4 ) = ( 2 gcd 4 ) and ( 2 gcd 4 ) = ( 2 gcd ( 2 + 2 ) ) = ( 2 gcd 2 ) = 2 . (Contributed by AV, 27-Aug-2020)
| Ref | Expression | ||
|---|---|---|---|
| Assertion | 6gcd4e2 |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | 6nn | ||
| 2 | 1 | nnzi | |
| 3 | 4z | ||
| 4 | gcdcom | ||
| 5 | 2 3 4 | mp2an | |
| 6 | 4cn | ||
| 7 | 2cn | ||
| 8 | 4p2e6 | ||
| 9 | 6 7 8 | addcomli | |
| 10 | 9 | oveq2i | |
| 11 | 2z | ||
| 12 | gcdadd | ||
| 13 | 11 11 12 | mp2an | |
| 14 | 2p2e4 | ||
| 15 | 14 | oveq2i | |
| 16 | gcdcom | ||
| 17 | 11 3 16 | mp2an | |
| 18 | 15 17 | eqtri | |
| 19 | 13 18 | eqtri | |
| 20 | gcdid | ||
| 21 | 11 20 | ax-mp | |
| 22 | 2re | ||
| 23 | 0le2 | ||
| 24 | absid | ||
| 25 | 22 23 24 | mp2an | |
| 26 | 21 25 | eqtri | |
| 27 | gcdadd | ||
| 28 | 3 11 27 | mp2an | |
| 29 | 19 26 28 | 3eqtr3ri | |
| 30 | 5 10 29 | 3eqtr2i |