Let $a_1,\ldots,a_n$ be nonzero integers. Define $$G=\{A\in\mathbb{Z}:A \text{ is a linear combination of } a_1,\ldots a_n\}$$
My definition for $\gcd(a_1,\ldots,a_n)$ is the principal ideal of $G$.
Define $G_i$ be the ideal generated by $a_i$.
My definition for $\operatorname{lcm}(a_1,\ldots,a_n)$ is the principal ideal of $\bigcap_{i=1}^n G_i$
(This is Andre Weil's definition)
With this definition, how do i prove $$\gcd(a_1,\ldots,a_n)\operatorname{lcm}(a_1,\ldots,a_n)=a_1\cdots a_n$$