Skip to content

Instantly share code, notes, and snippets.

View ice1000's full-sized avatar
♾️
Generalizing something

Tesla Zhang‮ ice1000

♾️
Generalizing something
View GitHub Profile
@Trebor-Huang
Trebor-Huang / Quotient.agda
Last active October 10, 2023 16:03
Quotient types in MLTT imply excluded middle
open import Agda.Builtin.Equality
-- Some familiar results about equality
UIP : {A : Set} (x y : A) (p q : x ≡ y) → p ≡ q
UIP x y refl refl = refl
coerce : {A : Set} (B : A → Set)
→ {x y : A} → x ≡ y
→ B x → B y
@matchy233
matchy233 / Microsoft.PowerShell_profile.ps1
Created April 22, 2023 12:52
Remove duplicated downloaded files
Function Remove-DupDownloads {
param (
[string]$SearchPath = ".",
[switch]$Recurse = $false
)
$FilePattern = '.*\([1-9][0-9]*\).*'
$GCIParams = @{
'Path' = $SearchPath
'File' = $true
@ncfavier
ncfavier / Niltok-coh.agda
Last active August 4, 2022 09:31
[WIP] Equivalence between the "coherentified" version of @ice1000's Niltok type and the booleans
open import 1Lab.Type
open import 1Lab.Path
open import 1Lab.Path.Groupoid
open import Data.Bool
data Niltok : Type where
t : Niltok
nicht : Niltok → Niltok
mod2 : (n : Niltok) → n ≡ nicht (nicht n)
coh : (n : Niltok) → ap nicht (mod2 n) ≡ mod2 (nicht n)
@wenkokke
wenkokke / README.md
Last active March 2, 2024 10:32
A list of tactics for Agda…

Tactics in Agda

This gist is my attempt to list all projects providing proof automation for Agda.

Glossary

When I say tactic, I mean something that uses Agda's reflection to provide a smooth user experience, such as the solveZ3 tactic from Schmitty:

_ :  (x y : ℤ)  x ≤ y  y ≤ x  x ≡ y
_ = solveZ3
@Gabriella439
Gabriella439 / trans.md
Last active November 28, 2023 06:30
I'm trans

I'm writing this post to publicly come out as trans (specifically: I wish to transition to become a woman).

This post won't be as polished or edited as my usual posts, because that's kind of the point: I'm tired of having to edit myself to make myself acceptable to others.

I'm a bit scared to let people know that I'm trans, especially because I'm not yet in a position where I can transition (for reasons I don't want to share, at least not in public) and it's really shameful. However, I'm getting really

@AndrasKovacs
AndrasKovacs / UnivPoly.hs
Last active June 14, 2021 07:23
simple universe polymorphism
{-# language LambdaCase, Strict, BangPatterns, ViewPatterns, OverloadedStrings #-}
{-# options_ghc -Wincomplete-patterns #-}
module UnivPoly where
import Data.Foldable
import Data.Maybe
import Data.String
import Debug.Trace
@bobatkey
bobatkey / cont-cwf.agda
Last active June 16, 2023 21:23
Construction of the Containers / Polynomials CwF in Agda, showing that function extensionality is refuted
{-# OPTIONS --rewriting #-}
module cont-cwf where
open import Agda.Builtin.Sigma
open import Agda.Builtin.Unit
open import Agda.Builtin.Bool
open import Agda.Builtin.Nat
open import Data.Empty
import Relation.Binary.PropositionalEquality as Eq
@AndyShiue
AndyShiue / CuTT.md
Last active April 28, 2024 23:35
Cubical type theory for dummies

I think I’ve figured out most parts of the cubical type theory papers; I’m going to take a shot to explain it informally in the format of Q&As. I prefer using syntax or terminologies that fit better rather than the more standard ones.

Q: What is cubical type theory?

A: It’s a type theory giving homotopy type theory its computational meaning.

Q: What is homotopy type theory then?

A: It’s traditional type theory (which refers to Martin-Löf type theory in this Q&A) augmented with higher inductive types and the univalence axiom.

@fgoinai
fgoinai / FnChain.py
Last active July 26, 2022 02:49
Just for chain invocation of function
from functools import partial, reduce
from itertools import chain
from typing import Callable, Any, Sequence, Optional, Mapping
class FnChain:
"""
FnChain(obj).map(...).filter(...).reduce(...)...
API LIST:
@jespercockx
jespercockx / PropRezz.agda
Created February 22, 2018 19:13
The great resurrection of Prop
{-
======================================
=== THE GREAT RESURRECTION OF PROP ===
======================================
Bringing back the impredicative sort Prop of definitionally proof-irrelevant propositions to Agda.
To check this file, get the prop-rezz branch of Agda at https://github.com/jespercockx/agda/tree/prop-rezz.
This file is a short demo meant to show what you currently can (and can't) do with Prop.