Skip to content

Instantly share code, notes, and snippets.

View kyle-query's full-sized avatar

Kyle Putnam kyle-query

View GitHub Profile
@kyle-query
kyle-query / notes.py
Last active April 22, 2026 01:09
Covariance, Contravariance, and Functions
from typing import Callable
# Using sequent calculus notation where <: means subtype and :> means supertype,
#
# P1 :> P2 R1 <: R2
# ------------------------
# (P1 -> R1) <: (P2 -> R2)
#