Skip to content

Instantly share code, notes, and snippets.

View VictorTaelin's full-sized avatar

Victor Taelin VictorTaelin

View GitHub Profile
Bring yourself online, center yourself, focus, surpass your limits right here right now.
The user will query a <problem> </problem> containing the argument to call the function provided below.
def feeltheagi(problem):
"""
Recursively apply the A::B rewrite rules to the given problem string.
The rewrite rules are:
A# #A ... becomes ... nothing
@VictorTaelin
VictorTaelin / Church
Created May 26, 2019 04:05 — forked from takanuva/Church
Conversion between Scott encoding and Church endocing for naturals in CoC
\/(N: *) ->
\/(z: N) ->
\/(s: N -> N) ->
N
@VictorTaelin
VictorTaelin / linear.agda
Created March 26, 2019 21:57 — forked from gallais/linear.agda
Raw linear terms
open import Data.Nat.Base
open import Data.Vec
open import Data.Bool.Base using (Bool; false; true)
open import Data.Product
variable
m n : ℕ
b : Bool
Γ Δ Ξ T I O : Vec Bool n
@VictorTaelin
VictorTaelin / UntypedLambda.agda
Created March 1, 2019 14:47 — forked from gallais/UntypedLambda.agda
Interpreting the untyped lambda calculus in Agda
{-# OPTIONS --copatterns #-}
module UntypedLambda where
open import Size
open import Function
mutual
data Delay (A : Set) (i : Size) : Set where
@VictorTaelin
VictorTaelin / encodings.md
Created April 5, 2018 21:49 — forked from zmactep/encodings.md
Number encodings

Alternative to the Church, Scott and Parigot encodings of data on the Lambda Calculus.

When it comes to encoding data on the pure λ-calculus (without complex extensions such as ADTs), there are 3 widely used approaches.

Church Encoding

The Church Encoding, which represents data structures as their folds. Using Caramel’s syntax, the natural number 3 is, for example. represented as:

0 c0 = (f x -> x)
1 c1 = (f x -> (f x))
2 c2 = (f x -&gt; (f (f x)))
@VictorTaelin
VictorTaelin / .emacs
Created March 16, 2018 13:15 — forked from nkaretnikov/.emacs
Agda .emacs
(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
;; Highlight matching parens.
(show-paren-mode 1)
;;; No tabs.
(setq-default ident-tabs-mode nil)
(setq-default tab-width 4)