[Agda] type of []
Thorsten Altenkirch
Thorsten.Altenkirch at nottingham.ac.uk
Tue Apr 17 14:52:36 CEST 2018
Not sure what is the "regular" way but could you not just supply the implicit argument to [] (or to take)?
take-n-[] : ∀ {α} {A : Set α} {n} → take n ([] {A}) ≡ []
or
take-n-[] : ∀ {α} {A : Set α} {n} → take {A} n [] ≡ []
On 17/04/2018, 13:45, "Agda on behalf of Sergei Meshveliani" <agda-bounces at lists.chalmers.se on behalf of mechvel at botik.ru> wrote:
People,
In the proof
take-n-[] : {n : ℕ} → take n [] ≡ []
take-n-[] {0} = refl
take-n-[] {suc _} = refl
Agda cannot derive the type of [].
I can fix the signature in two ways.
(I)
take-n-[] : ∀ {α} {A : Set α} {n} → let []A : List A -- lenghty
[]A = []
in
take n []A ≡ []
(II)
El : ∀ {a} (A : Set a) → A → A -- for common usage
El A x = x --
--
syntax El A x = x ∈: A --
take-n-[] : ∀ {α} {A : Set α} {n} → take n ([] ∈: List A) ≡ []
What is a regular approach, please?
------
Sergei
_______________________________________________
Agda mailing list
Agda at lists.chalmers.se
https://lists.chalmers.se/mailman/listinfo/agda
This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment.
Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored
where permitted by law.
More information about the Agda
mailing list