Questions tagged [agda]

Agda is a dependently typed, total functional programming language and a proof assistant.

Agda is a dependently typed functional programming language. It has inductive families, i.e., data types which depend on values, such as the type of vectors of a given length. It also has parametrised modules, mixfix operators, Unicode characters, and an interactive Emacs interface which can assist the programmer in writing the program.

Agda is a proof assistant. It is an interactive system for writing and checking proofs. Agda is based on intuitionistic type theory, a foundational system for constructive mathematics developed by the Swedish logician Per Martin-Löf. It has many similarities with other proof assistants based on dependent types, such as Coq, Epigram, Matita and NuPRL.

The current version is 2.6.1.1

Useful links

819 questions
0
votes
1 answer

Agda won't install

I can't get Agda to install on Mac 10.9.2, Haskell platform 2013.2.0.0. When I run cabal install Agda, I get this. 39 warnings and 1 error generated. Failed to install Agda-2.3.2.2 Updating documentation index…
user1604015
  • 415
  • 2
  • 9
0
votes
1 answer

Pair equality in agda

I have the following code which I want to prove: data Pair (A : Set) (B : A → Set) : Set where pair : (a : A) → (B a) → Pair A B pairEq : (A : Set) → (B : A → Set) → (a : A) → (b₁ b₂ : B a) → (pair {A} {B} a b₁ ≡ pair {A} {B} a b₂) → b₁ ≡…
Konstantin Solomatov
  • 10,252
  • 8
  • 58
  • 88
0
votes
1 answer

Proof in Agda and how to evaluate list based function in C-c C-n

I am new in Agda BTW, how could i evaluate a list related function like reverse by C-c C-n ? I mean how could i type the list like reverse [1,2,3] as in Haskell but it not work in agda. Many thanks
0
votes
1 answer

Insufficiently evaluated context inside `with` clause

I'm stuck on the following proof. module Temp where open import Data.Empty open import Data.Fin hiding (compare) open import Data.Nat hiding (compare); open import Data.Nat.Properties open import Function open import Level open…
Roly
  • 2,126
  • 2
  • 20
  • 34
0
votes
2 answers

Agda - Reverse-helper

I'm trying to prove this lema reverse-++ : ∀{ℓ}{A : Set ℓ}(l1 l2 : A) → reverse (l1 ++ l2) ≡ (reverse l2) ++ (reverse l1) reverse-++ [] [] = refl reverse-++ l1 [] rewrite ++[] l1 = refl reverse-++ l1 (x :: xs) = {!!} But another function,…
JrPtn
  • 83
  • 2
  • 8
-1
votes
2 answers

Rasterization of image

I have a function ℚ -> ℚ -> Bool taking a Cartesian coordinate, where true stands for black and false for white. Is there any existing library that I can use to "rasterize" it into a bitmap image?
-1
votes
1 answer

Agda: std-lib: List: all but last element with snoc

I defined allButLast this way: allButLast : ∀ {a} {A : Set a} → List A → List A allButLast l.[] = l.[] allButLast list = l.reverse (tail' (l.reverse list)) and would like to prove the following statement: allButLast-∷ʳ : ∀ {a} {A : Set a} → …
fsuna064
  • 195
  • 1
  • 7
-1
votes
1 answer

how to define an element of type record?

I have define the datatype of real number as.. record ℝ : Set where field L : Stream pair R : Stream pair inhabited : ∀ (x : pair) → ( (x mem L) or (x mem R)) disjoint : ∀ (x : pair) → ( (not (x mem L)) or (not (x mem…
ajayv
  • 641
  • 6
  • 21
-3
votes
1 answer

How to prove the right identity in setoid in Agda

I wanted to prove group properties over integer. I found the setoid representation of integer makes proof easy. ℤ is defined as (ℕ , ℕ) such that (a , b) represents a - b zero : ℤ zero = 0 , 0 I have already proven leftIdZ : (a : ℤ) → zero + a ≡…
ajayv
  • 641
  • 6
  • 21
1 2 3
54
55