Metamath Proof Explorer


Theorem ee7.2aOLD

Description: Lemma for Euclid's Elements, Book 7, proposition 2. The original mentions the smaller measure being 'continually subtracted' from the larger. Many authors interpret this phrase as A mod B . Here, just one subtraction step is proved to preserve the gcdOLD . The rec function will be used in other proofs for iterated subtraction. (Contributed by Jeff Hoffman, 17-Jun-2008) (Proof modification is discouraged.) (New usage is discouraged.)

Ref Expression
Assertion ee7.2aOLD A B A < B gcd OLD A B = gcd OLD A B A

Proof

Step Hyp Ref Expression
1 nndivsub A B x A x A < B B x B A x
2 1 exp32 A B x A x A < B B x B A x
3 2 com23 A B x A < B A x B x B A x
4 3 3expia A B x A < B A x B x B A x
5 4 com23 A B A < B x A x B x B A x
6 5 imp A B A < B x A x B x B A x
7 6 imp A B A < B x A x B x B A x
8 7 pm5.32d A B A < B x A x B x A x B A x
9 8 rabbidva A B A < B x | A x B x = x | A x B A x
10 9 supeq1d A B A < B sup x | A x B x < = sup x | A x B A x <
11 df-gcdOLD gcd OLD A B = sup x | A x B x <
12 df-gcdOLD gcd OLD A B A = sup x | A x B A x <
13 10 11 12 3eqtr4g A B A < B gcd OLD A B = gcd OLD A B A
14 13 ex A B A < B gcd OLD A B = gcd OLD A B A