Date: 2016-12-19 09:04 am (UTC)
From: [identity profile] pbl.livejournal.com
The first function I write for every new data type nowadays is an eliminator. I really wish there was an extension for that.

Date: 2016-12-19 06:03 pm (UTC)
From: [identity profile] pbl.livejournal.com
Good question, damfino a formal definition off the top of my head. Except maybe "things that make up Scott encodings", but that's circular. If we're talking about plain algebraic types, either : (A -> C) -> (B -> C) -> A + B -> C and uncurry : (A -> B -> C) -> A x B -> C are eliminators for sum and product types, and K-combinator is an eliminator for both void and unit types. But as [livejournal.com profile] zeit_raffer hints below, those can be extended even to dependent types, let alone GADTs, but I'm not prepared to give a formal definition. He probably could, he was working on dependent sum/product eliminators in various encodings recently.

Date: 2016-12-19 08:02 pm (UTC)
From: [identity profile] exceeder.livejournal.com
I never heard of it, but I liked this Quora answer about eliminator: https://www.quora.com/In-type-theory-what-is-an-eliminator-and-what-is-its-opposite

"An eliminator for a type is an operator or construct which characterises the use of the type's inhabitants. For example, application is an eliminator for function types; projections are eliminators for record types; conditional expression is an eliminator for Booleans."

Date: 2016-12-19 08:47 pm (UTC)
From: [identity profile] juan-gandhi.livejournal.com
Oh. Thanks a lot. And two beautiful answers on Quora. Just cool.

Date: 2016-12-20 03:58 am (UTC)
From: [identity profile] juan-gandhi.livejournal.com
I'm pretty much familiar with the logical aspect; did not know it's applicable to types. I mean, Kripke semantics of course allows this interpretation.

Date: 2016-12-20 07:41 am (UTC)
From: [identity profile] sassa-nf.livejournal.com
I see. Yeah, if you read MLTT or HoTT, they introduce the rules as introductions and eliminations - to the extent that foldr is a called a List eliminator.
Edited Date: 2016-12-20 07:43 am (UTC)

Date: 2016-12-20 08:34 am (UTC)
From: [identity profile] juan-gandhi.livejournal.com
Have to read it, yes.

Date: 2016-12-19 10:17 am (UTC)
From: [identity profile] zeit-raffer.livejournal.com

Тихон в примечании сомневается в элиминаторах для Gadt. Фома неверующий.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

July 2025

S M T W T F S
  12345
6789 1011 12
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 15th, 2025 12:00 am
Powered by Dreamwidth Studios