Two "if"s in a row

Q: Why did you write that?

A: I wrote it to see if if we explain our logic clearly we can come to an agreement ...

I'm worried about the "if if" part of the sentence. It doesn't read right to me without the double if, but I have never seen it before.

Is it grammatically correct (and why or why not)?


Solution 1:

I wrote it to see whether, if we explain our logic clearly, we can come to an agreement ....

The parenthetical phrase if we explain our logic clearly should be set off with a comma pair.

Also, if you want to be pedantic (and I do), the if in the main clause would more properly be a whether. To quote Grammar Girl,

Although in informal writing and speech the two words are often used interchangeably, in formal writing, such as in technical writing at work, it's a good idea to make a distinction between them because the meaning can sometimes be different depending on which word you use. The formal rule is to use if when you have a conditional sentence and whether when you are showing that two alternatives are possible.

Solution 2:

"I wrote it to see if we can come to an agreement if we explain our logic clearly."

"I wrote it to see if, explaining our logic clearly, we can come to an agreement."

Maybe there are other ways to write it too but these are some ways I think it can be written, in addition to what TRiG already posted.