Let $R$ be a commutative unitary ring. The task is to prove the statement which says that for an element $a\in R$ stands: $a$ is an element of every maximal ideal of $R$ iff $1-ab$ is a unit for all $b \in R$.

My effort

Further I suppose ring is non-trivial, otherwise situation is clear.

For an arbitrary $b \in R$ we consider principal ideal $(b)$ and find a maximal ideal $\mathfrak{m}_b\supset (b)$ (according to Zorn's Lemma), so we have $a\in \mathfrak{m}_b, b \in \mathfrak{m}_b\Rightarrow ab \in \mathfrak{m}_b$. $\mathfrak{m}_b$ is maximal, hence particularly prime, so $1\notin \mathfrak{m}_b$ and $(1-ab)+\mathfrak{m}_b\neq0+\mathfrak{m}_b\in R/\mathfrak{m}_b$. $R/\mathfrak{m}_b$ is a field, so we find $p \in R : p(1-ab)+\mathfrak{m}_b=1+\mathfrak{m}_b$. But seemingly this is not enough to find inverse of $1-ab$ in $R$.

In other direction I can only show that: $1-ab$  is invertible $\Rightarrow ab\neq1\Rightarrow a$ is not a unit and hence is an element of a maximal ideal. But I can't figure out how to show that $a$ is in every maximal ideal.

I give up because I tried to solve this too long, the statement seems pretty natural for me, but I don't see something obvious so I would love it if someone gives me an advice. 

Thanks in advance!


Question: CLR SQL Assembly: Get the Bytestream?
Answer: It's just a hex representation of the dll. This bit should do the trick:

    static string GetHexString(string assemblyPath)
    {
        if (!Path.IsPathRooted(assemblyPath))
            assemblyPath = Path.Combine(Environment.CurrentDirectory, assemblyPath);

        StringBuilder builder = new StringBuilder();
        builder.Append("0x");

        using (FileStream stream = new FileStream(assemblyPath,
              FileMode.Open, FileAccess.Read, FileShare.Read))
        {
            int currentByte = stream.ReadByte();
            while (currentByte &gt; -1)
            {
                builder.Append(currentByte.ToString("X2", CultureInfo.InvariantCulture));
                currentByte = stream.ReadByte();
            }
        }

        return builder.ToString();
    }


You should use the resulting string like so:

string hexString = GetHexString(assemblyPath);
string sql = "CREATE ASSEMBLY [" + assemblyName + "] FROM " + hexString + 
             " WITH PERMISSION_SET = " + somePermissionSet;