This proof proceeds by induction, and will be seen to rather subtly combine the inductive hypothesis and a couple of lemmas:
b<b (a:. u,v:. GCD(a;b;ua+vb)) (inductive hyp)Thm* a,b,y:. GCD(a;b;y) GCD(b;a;y) Thm* a,b,y,k:. GCD(a;b;y) GCD(a;b+ka;y)
Note the complex argument of the last lemma is suggestive of the division theorem
Thm* a:, b:. q:, r:b. a = qb+r
Let's proceed. Use true-for-less induction on
a:. u,v:. GCD(a;b;ua+vb)
under the inductive hyp mentioned above for
It turns out that the inductive hyp will be used with
b:. b<b (u,v:. GCD(b;b;ub+vb)) .
Recall we are trying to show that
u,v:. GCD(a;b;ua+vb)
If
So assume for the rest that
Let's improve the match between our goal and our simplified inductive hyp. It is enough to show
u,v:. GCD(b;a;ub+va) ,
since
Using division,
u,v:. GCD(b;r+qb;ub+v(r+qb)) .
Applying our simplified inductive hyp the the remainder
x,y:. GCD(b;r+qb;xb+yr) ,
which differs from our new goal only in one argument to
So, it is enough to show
u,v:. ub+v(r+qb) = xb+yr , which would follow from
u:. ub+y(r+qb) = xb+yr , by usingy forv , which would follow from
u:. ub+yqb = xb , which is satisfied byx-qy
QED
About: