Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 7 years ago

dan_fulea gravatar image

Nice homework!

sage: J = [1..50]
sage: Set( [ bool( ZZ.ideal( [a,b] ) == ZZ.ideal( gcd(a,b) ) ) for a in J for b in J ] )
{True}

means that for two integers a,b in the rather small interval of integers J from 1 to 50 we have the equality of the ideals which are generated by:

  • a and b (two generators),
  • respectively by their gcd (one generator).

New homework:

What is telling us the following?

sage: Set( [ bool( ZZ.ideal( [a,b,c] ) == ZZ.ideal( gcd([a,b,c]) ) ) for a in J for b in J for c in J ] )
{True}

Bonus:

What is telling us the following?

sage: C = cartesian_product( [ range(100, 120) for _ in range(4) ] )
sage: C.random_element()
(114, 119, 111, 106)
sage: Set( [ bool( ZZ.ideal(list(c)) == ZZ.ideal( gcd(list(c)) ) ) for c in C ] )
{True}