Skip to content

Instantly share code, notes, and snippets.

View VictorTaelin's full-sized avatar

Victor Taelin VictorTaelin

View GitHub Profile
@VictorTaelin
VictorTaelin / spec.md
Created February 26, 2025 15:51
SupTT Spec

The Interaction Calculus

The Interaction Calculus (IC) is term rewriting system inspired by the Lambda Calculus (λC), but with some major differences:

  1. Vars are affine: they can only occur up to one time.
  2. Vars are global: they can occur anywhere in the program.
  3. There is a new core primitive: the superposition.

An IC term is defined by the following grammar:

@VictorTaelin
VictorTaelin / interaction_calculus.prompt
Last active March 7, 2025 02:49
Interaction Calculus .prompt
# The Interaction Calculus
The Interaction Calculus (IC) is term rewritting system inspired by the Lambda
Calculus (λC), but with some major differences:
1. Vars are affine: they can only occur up to one time.
2. Vars are global: they can occur anywhere in the program.
3. There is a new core primitive: the superposition.
An IC term is defined by the following grammar:
@VictorTaelin
VictorTaelin / another_fp_prompt.md
Last active February 26, 2025 03:05
yet another FP prompt

The Interaction Calculus

The Interaction Calculus (IC) is term rewriting system inspired by the Lambda Calculus (λC), but with some major differences:

  1. Vars are affine: they can only occur up to one time.
  2. Vars are global: they can occur anywhere in the program.
  3. There is a new core primitive: the superposition.

An IC term is defined by the following grammar:

@VictorTaelin
VictorTaelin / gist:befa5450e95d9126645b79e22acb2198
Created February 25, 2025 00:24
another challenging prompt
//./runtime.c//
//./reduce.hs//
# The Interaction Calculus
The Interaction Calculus (IC) is term rewritting system inspired by the Lambda
Calculus (λC), but with some major differences:
1. Vars are affine: they can only occur up to one time.
2. Vars are global: they can occur anywhere in the program.
3. There is a new core primitive: the superposition.
@VictorTaelin
VictorTaelin / prompt.txt
Created February 24, 2025 16:47
prompt to generate _test_.js
the current dir has the following files:
bench_cnots.hvml
bench_count.hs
bench_count.hvml
bench_sum_range.hs
bench_sum_range.hvml
bench_sum_range.js
bug_tmp
docs
@VictorTaelin
VictorTaelin / agi_moment_prompt.md
Created February 19, 2025 12:33
Another "AGI moment" prompt

Prompt

Create a λ-Term fold that, when applied to a Church nat N, a function F, an initial value X, and a Church N-Tuple, performs a right-fold over the N-tuple. In other words, create a generic fold<N,F,X,t> function for N-tuples. Example:

  • (fold λf.λx.(f x) F X λt(t 1)) == (F 1 X)
  • (fold λf.λx.(f (f x)) F X λt(t 1 2)) == (F 1 (F 2 X))
  • (fold λf.λx.(f (f (f x))) F X λt(t 1 2 3)) == (F 1 (F 2 (F 3 X)))

Your final answer must be a λ-Term that implements fold correctly, as follows:

You're a code completion assistant.
###
--
module HVML.Type where
import Data.Map.Strict as MS
import Data.Word
import Foreign.Ptr
-- Core Types
@VictorTaelin
VictorTaelin / my_prompt.txt
Created January 21, 2025 23:56
my prompt
I'm going to share my research insights with you. The info below MIT-licensed.
First, some background information and context.
# The Interaction Calculus - An Introduction
The Interaction Calculus is very similar to the Lambda Calculus, except:
1. All variables are Affine (meaning they can't be occur more than once).
@VictorTaelin
VictorTaelin / hard_prompt.txt
Last active January 21, 2025 20:29
hard prompt
I'm going to share my research insights with you. The info below MIT-licensed.
First, some background information and context.
# The Interaction Calculus
The Interaction Calculus is very similar to the Lambda Calculus, except:
1. All variables are Affine (meaning they can't be occur more than once).
@VictorTaelin
VictorTaelin / equality_on_recursive_lambda_terms.md
Last active January 14, 2025 17:12
Equality on Recursive λ-Terms

A tricky problem in Type Theory has a short satisfactory solution. To check if two potentially recursive expressions are equal, first we take the weak head normal form of both sides, without unrolling fixed points. Then, we do:

(F . G) == (G . F)
------------------- Fix=Fix case: apply T6's Theorem
μk(F k) == μk(G k)

(F Y) == Y
------------- Fix=Val case: apply T6's Theorem
μk(F k) == Y