Skip to content

Instantly share code, notes, and snippets.

View ncfavier's full-sized avatar
🌑

Naïm Favier ncfavier

🌑
View GitHub Profile
-- Moved to https://agda.monade.li/PostcomposeNotFull.html
-- Moved to https://agda.monade.li/AdjunctionCommaIso.html
open import 1Lab.Prelude
open import Data.Nat
module wip.Nat where
module _
(N : Type)
(N-set : is-set N)
(z : N)
(s : N → N)
{-# OPTIONS --cubical #-}
open import Cubical.Data.Int
open import Cubical.Data.Int.Divisibility
open import Cubical.Data.Nat
open import Cubical.Foundations.Everything
open import Data.List
open import Data.List.NonEmpty as List⁺
data Vertex : Type where
a b c : Vertex
module Lan where
open import Categories.Kan
open import Data.Product
open import Level
open import Function renaming (id to funId)
open import Categories.Functor
open import Categories.Category.Instance.Sets
open Functor
open import Relation.Binary.PropositionalEquality
import Data.Bits
import Data.Foldable
{-
Two implementations of A372325 (https://oeis.org/A372325).
The first one ties the knot on the sequence itself, but needs the first
three values in order to get bootstrapped.
Using a cleverer takeWhile we could produce the first 0, but in order to
produce 2 we need to know that 1 isn't in the sequence, which we only
-- Moved to https://agda.monade.li/NaiveFunext.html
@ncfavier
ncfavier / Maze.hs
Last active May 2, 2024 21:32
Exploring fractal mazes in cubical type theory https://f.monade.li/maze.pdf
{-# LANGUAGE BlockArguments #-}
import Control.Monad
import Data.Foldable
import Data.Map (Map)
import Data.Map qualified as Map
import Data.Set (Set)
import Data.Set qualified as Set
import Data.Sequence qualified as Seq
import Data.PriorityQueue.FingerTree qualified as PQ
-- Moved to https://agda.monade.li/Goat.html
open import Cat.Functor.Naturality
open import Cat.Functor.Bifunctor
open import Cat.Functor.Coherence
open import Cat.Instances.Product
open import Cat.Functor.Compose
open import Cat.Diagram.Monad
open import Cat.Monoidal.Base
open import Cat.Functor.Base
open import Cat.Prelude