### Ouroboros in Std.Logic

This post dissects a very short yet fascinating and enigmatic proof that can be found in the `Logic`

module of the standard library of the Lean proof verifier:

```
theorem iff_not_self : ¬(a ↔ ¬a)
| H => let f h := H.1 h h
f (H.2 f)
```

OK, the fact being proved isn’t enigmatic — it’s stating that a proposition’s truth value is never the same as its own negation’s — but the proof thereof sure is. If that looks to you like some incomprehensible formal logic circling to eat its own tail, that’s because it kinda is.

However, it’s written *extremely* densely, which inhibits comprehension — which is sad, because the way it works is very interesting. It’s quite the rabbit hole, though, so let’s take our trusty spade and start digging. The very first thing we encounter is that Lean implicitly converts the `¬(a ↔ ¬a)`

into `(a ↔ ¬a) → False`

. This is because Lean uses dependent type theory to represent logical statements and their proofs, so we need to discuss how these kinds of theories are used with formal logic.