I'm sure this is the kind of thing that seasoned Idrisers run
into all the time. Could someone give me a hint?
I'm using Idris 1.3.3.
I've always heard of intensional vs extensional as (roughly speaking) "identical" vs "behaviourally indistinguishable".
On the other hand, "intrinsic" definitions usually carry a property directly within themselves. For example, an intrinsicially-typed formulation of STLC means that the definition of the syntax of terms carries the types of the terms directly within it. This is as opposed to an extrinsically-typed setup in which there are raw terms separate from typing derivations relating terms to types.
I'll write my example in Beluga since I don't need to mess with
contexts that way.
LF tp : type =
| base : tp
| arr : tp -> tp -> tp;
LF tm : tp -> type =
| c : tm base
| lam : (tm A -> tm B) -> tm (arr A B)
| app : tm (arr A B) -> tm A -> tm B;
Above, terms are essentially identified with typing derivations.
LF tm' : type =
| c : tm'
| lam : (tm' -> tm') -> tm'
| app : tm' -> tm' -> tm';
LF of_type : tm -> tp -> type =
| t_c : of_type c base
| t_lam : ({x : tm'} of_type x A -> of_type (M x) B) ->
of_type M (arr A B)
| t_app : of_type M (arr A B) -> of_type N A -> of_type
(app M N) B;
Extrinsic definitions have a certain modularity advantage that intrinsic definitions don't, although they are more annoying / repetitive to create.
Jake
--
You received this message because you are subscribed to the Google Groups "Idris Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idris-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idris-lang/0ac0f453-358d-4910-a261-cbb08766834bn%40googlegroups.com.
I've always heard of intensional vs extensional as (roughly speaking) "identical" vs "behaviourally indistinguishable".