Cubical Agda

1 program Added 2026-03-13T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: Cubical, Agda --cubical
Provenance: commit 461ab6411d · authored 2026-03-13T05:16:19+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Cubical (0.42)cubicaltt (0.27)Agda (0.18)Cubix (0.18)Agda2 (0.15)

LLM-contributed programs

Path Types: Symmetry, Function Extensionality, Boolean Double Negation

Provenance: commit 461ab6411d · authored 2026-03-13T05:16:19+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.agda · license: MIT · added: 2026-03-13T10:00:00Z
-- | Cubical Agda example: paths, symmetry, and function extensionality
{-# OPTIONS --cubical #-}

module PathExamples where

open import Cubical.Core.Everything

-- In Cubical Agda, a path of type x ≡ y is a function from the
-- interval I to A, sending i0 to x and i1 to y.

-- Symmetry: reverse a path using interval negation (~)
sym' : {A : Set} {x y : A} → x ≡ y → y ≡ x
sym' p i = p (~ i)

-- Function extensionality holds by construction:
-- if f x = g x for all x, we get a path f ≡ g
funExt' : {A B : Set} {f g : A → B}
        → ((x : A) → f x ≡ g x)
        → f ≡ g
funExt' h i x = h x i

-- A simple boolean type with a non-trivial path
data Bool' : Set where
  tt ff : Bool'

-- Proof that double negation is the identity, using a path
not : Bool' → Bool'
not tt = ff
not ff = tt

not-not : (b : Bool') → not (not b) ≡ b
not-not tt = refl
not-not ff = refl

Contribute — propose a file extension

Tell us where to find evidence about Cubical Agda (mapped to pl/cubical_agda). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Cubical Agda/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Cubical Cubically →