How can we prove that if for all inputs, f and g returns the same output, then the two functions are equivalent?
lemma func_ext(f: int -> int, g: int -> int)
requires forall x :: f(x) == g(x)
ensures f == g
I would assume this is an axiom but it does not work. Is function extensionality not true in Dafny?
I don't think dafny supports function extensionality. I didn't find anything in official documentation but here is link to comment which confirms this https://github.com/dafny-lang/dafny/issues/2308#issuecomment-1169553777