Write using only the logical operators and symbols $ +, *, 1, 0, \le, |$ : "x is the greatest common factor of a and b"

156 Views Asked by At

Write using only the logical operators and symbols $ +, *, 1, 0, \le, |$ : "x is the greatest common factor of a and b"
To begin with, I came up with a definition of the greatest common factor: $$GCF(x, y) = \max \{z: z|x \land z| y \}$$ And so I tried to copy this definition using only the allowed symbols:
$$x|a \land x|b \land 1\le x $$ But this notation does not guarantee that x is the biggest number with this property, and so there will be more than one number satisfying this formula. What should I change to make it work?

1

There are 1 best solutions below

0
On

Well, we can just be literal.

Greatest common factor of $a$ and $b$ means

$x$ so that $a|x$ and $b|x$ and if $y > x$ then $y$ is not a common multiple or

$x$ so that $a|x$ and $b|x$ and if $y$ is a common multiple then $y \le x$. So

$x: x|a \land x|b \land [(y|a \land y|b) \implies y \le x)]$.