In Lean, how do I prove that a variable, or more generally an expression, ranging over a finite type must be equal to one of the values of the finite type?
In particular, the following should be easy, but I do not know where to begin:
inductive Foo where
| alice
| bob
| charles
open Foo
inductive Bar where
| boy
| girl
open Bar
def f : Foo → Bar
| charles => boy
| alice => girl
| bob => boy
example (x:Foo) (h: f x = boy): (x=bob ∨ x=charles) :=
sorry