Ask Your Question
0

What are the following commands telling us? R=Integers() [R.ideal([a,b]) == R.ideal([gcd(a,b)]) for a in range(1,20) for b in range(1,20)]

asked 2017-10-10 17:07:58 -0500

anonymous user

Anonymous

updated 2017-10-10 21:09:17 -0500

fidbc gravatar image

What are the following commands telling us?

R=Integers()
[R.ideal([a,b]) == R.ideal([gcd(a,b)]) for a in range(1,20) for b in range(1,20)]
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-10-10 21:29:50 -0500

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}
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-10-10 17:07:58 -0500

Seen: 28 times

Last updated: Oct 10