Intuitively, when two functions g
and h
are equal for all x
, we can imagine that g = h
, and therefore replace all occurrences of f g
into f h
. This is what we call function extensionality. However, in Coq function extensionality is not added by default, so we need it, we need to add an axiom.
However, I'd like to avoid to use this axiom, and try to find a theorem that is equivalent in practive, that would look like "for all f
that are inductive functions that output an inductive type, forall g
and h
, f g = f h". In particuliar, f
cannot be identity, because the identity function is not an inductive type.
For now, when I need to do something like this, I need to manually handle all the cases of f
, and it can be quite long. Do you know if I can write a theorem like this in pure Coq, or maybe if it's not possible, can I create a tactic that would generate this proof for all f
?
Thank you!
Fixpoint
declaration? – Arthur Azevedo De Amorim