Skip to content

Instantly share code, notes, and snippets.

@basic-calculus
basic-calculus / lk.v
Last active October 10, 2022 00:42
By abuse of the environment you can do LK like things within a natural deduction style. Super weird to evaluate though.
Require Import Coq.Unicode.Utf8.
Require Coq.Program.Equality.
Require Coq.Lists.List.
Import IfNotations.
Import List.ListNotations.
Inductive sort := dom | void | unit | sum (A B: sort) | prod (A B: sort) | fn (A B: sort).
Module Var.
@basic-calculus
basic-calculus / messingabout.v
Created October 9, 2022 02:32
kind of like a PROP?
Require Import Coq.Unicode.Utf8.
Require Import Coq.Classes.SetoidClass.
Require Import Coq.Arith.PeanoNat.
Require Coq.Vectors.Vector.
Require Coq.Vectors.Fin.
Import IfNotations.
Import Vector.VectorNotations.
Reserved Infix "∘" (at level 30).
@basic-calculus
basic-calculus / thewraththatmighthavebeen.txt
Created October 8, 2022 21:10
The wrath that might have been, old 2019 poetry
THE WRATH THAT MIGHT HAVE BEEN
At the rising of the sun,
From their hovels creep the working men
And crawling from the forest muck, crawling from its den
To the city - a sick thing wanders in
It is almost like a man
a rotten starving man
@basic-calculus
basic-calculus / thenightghost.txt
Created October 8, 2022 21:00
Some old poetry from 2019 I made
The bungler in the grip of the demon held
To his crypt by strange means is compelled
And sleeping as a corpse in darkness rotting
He dreams forth the red eyed thing
So rises from the sleeper's breath
Comes the Night Ghost - who brings death!
The Night Ghost climbs, as a shadow leaping, overtop the manor wall
And through an open window goes, as a chilling fog
To the room of the sleeper he creeps
@basic-calculus
basic-calculus / rumble.txt
Last active September 17, 2022 02:38
I made a pottery. I love this song so I got inspired by it. https://www.youtube.com/watch?v=ucTg6rZJCu4
A man walked into town
Bound up in a brown coat
When he talked you could see
Beneath his broad hat
A cigarillo glow
Red then black then red
His face all bandaged
The left arm just gone
And the man had a limp when he walked
@basic-calculus
basic-calculus / adhoc.v
Created September 15, 2022 03:21
not sure of something less ad hoc
Require Import Coq.Unicode.Utf8.
Require Import Coq.Strings.String.
Require Import Coq.Arith.PeanoNat.
Require Coq.Vectors.Fin.
Require Coq.Lists.List.
Import IfNotations.
Import List.ListNotations.
Fixpoint inj {m n} (e: Fin.t m): Fin.t (m + n) :=
Require Import Coq.Unicode.Utf8.
Require Import Coq.Classes.SetoidClass.
Require Import Coq.Program.Basics.
Import IfNotations.
Local Open Scope program_scope.
(* just weird all around *)
Require Import Coq.Unicode.Utf8.
Require Coq.Vectors.Vector.
Require Coq.Lists.List.
Import IfNotations.
Import List.ListNotations.
Import Vector.VectorNotations.
Inductive sort := dom | fn (A B: sort).
Require Import Coq.Unicode.Utf8.
Require Import Coq.Program.Basics.
Require Import Coq.Logic.FunctionalExtensionality.
Import IfNotations.
Open Scope program_scope.
(* a profunctor from set to set *)
Class Profunctor P := {
Require Import Coq.Unicode.Utf8.
Require Import Coq.Strings.String.
Require Import Coq.Program.Equality.
Require Coq.Vectors.Vector.
Require Coq.Lists.List.
Import IfNotations.
Import Vector.VectorNotations.
Definition vand {n}: Vector.t _ n → bool := Vector.fold_left andb Datatypes.true.