The barber paradox in Event-B (Michael Leuschel)

 

https://www.youtube.com/watch?v=J3mYPI2_d84

For fun I encoded the barber paradox in Event-B:
```
context BarberParadox
sets People
constants barber shaves
axioms
@axm1 barber∈People
@axm2 shaves ∈ People ↔ People
@axm3 ∀x· x∈People ⇒ (x↦x ∉ shaves ⇔ barber↦x ∈ shaves)
theorem @thm1 barber↦barber ∈ shaves
theorem @thm2 barber↦barber ∉ shaves
theorem @thm3 1=2
end
```
and the answer of the Rodin auto-provers is, yes, the barber shaves himself and he also does not shave himself and 1=2. The answer of ProB is that the axioms are inconsistent and the context cannot be animated.
 
Published on Linkedin, 21/01/2026 
 

 

Comments

Popular posts from this blog

Ce que je dois à Jean-Raymond Abrial

Jean-Raymond Abrial (1938, 2025)

On B, Jean-Raymond Abrial