Skip to content

Instantly share code, notes, and snippets.

View oxij's full-sized avatar

Jan Malakhovski oxij

View GitHub Profile
@oxij
oxij / Church.agda
Last active December 13, 2015 17:18
Church datatype encoding in Agda
-- Make Agda as unsafe as Haskell is
{-# OPTIONS
--type-in-type
--no-termination-check #-}
-- `type-in-type` for impredicative Π-types (Set → Set : Set)
-- `no-termination-check` for blowing up
module Church where
@oxij
oxij / NumTest.agda
Created July 13, 2012 02:30
nested-recursion == recursion with accumulator for all arguments
-- The trick for proving that nested-recursion == recursion with accumulator for all arguments (in Agda).
-- Example for Nat. Should be generalizable.
module NumTest where
import Level
data _≡_ {α} {A : Set α} (a : A) : A → Set α where
refl : a ≡ a