Is it possible in Coq to implicitly propagate implicit arguments?
Class C := { n : nat }.
Section Sec.
Context {c : C}.
Definition f := fun x => x + n.
End Sec.
Fail Lemma f_inc : forall x, f x >= x.
For example here, after the end of section Sec
, c
is implicit argument of f
but it is not automatically inserted as implicit argument of f_inc
, which uses f
.
I know this can be achieved by inserting Context {c : C}.
before the lemma but it would make c
an axiom and I still need the possibility to instantiate it later. I could also open a new section with context c
but I don't want to put the whole project inside sections because of scoping issues.