I have a function “HF” has type inside section S
Open S.
HF: forall f : dup_sig Sig, dup_ar f = ASignature.arity (F f)
End S.
Signature: Type
Sig: Signature
dp_Sig : Signature
dup_sig : Signature -> Signature
F : dup_sig Sig -> Sig
dup_symb : Signature -> Type
dup_ar : forall Sig : Signature, dup_symb Sig -> nat
ASignature.arity : forall s : Signature, s -> nat
I want to write a lemma:
Lemma incl_fl : forall R R, Fl HF R [= R'.
Where
Fl: forall (S1 S2 : Signature) (F : S1 -> S2),
(forall f : S1, ASignature.arity f = ASignature.arity (F f)) ->
list (ATrs.rule S1) -> list (ATrs.rule S2)
It is Ok when I have this function inside the section S.
But I would like to write the function incl_fl outside the section S.
Here is the type of HF outside section S.
HF: forall (arity : symbol -> nat) (f : dup_sig (Sig arity)),
dup_ar f = ASignature.arity (F f)
Lemma incl_fl : forall arity R R', Fl HF R [= R'.
I got an error at “HF” :
The term "HF" has type
"forall (arity : symbol -> nat) (f : dup_sig (Sig arity)),
dup_ar f = ASignature.arity (F f)" while it is expected to have type
"forall f : ?35524, ASignature.arity f = ASignature.arity (?35526 f)".
I tried to find a place to add the arity in this function “HF“, but I don’t success.
Could you please help me write the lemma “incl_fl” outside the section S? Thank you very much.
I found the answer.