agda

proofs about regular expressions

Does anyone know any examples of the following? Proof developments about regular expressions (possibly extended with backreferences) in proof assistants (such as Coq). Programs in dependently-typed languages (such as Agda) about regular expressions. ...

Working on Peano Axioms in Agda and hit a bit of a sticking point

PA6 : ∀{m n} -> m ≡ n -> n ≡ m is the axiom I am trying to solve and support, I've tried using a cong (from the core library) but am having troubles with the cong constructor PA6 = cong gets me nowhere, I know for cong I am required to supply a refl for equality and a type, but I'm, not sure what type I'm supposed to supply. Ideas? ...

"Strictly positive" in Agda

I'm trying to encode some denotational semantics into Agda based on a program I wrote in Haskell. data Value = FunVal (Value -> Value) | PriVal Int | ConVal Id [Value] | Error String In Agda, the direct translation would be; data Value : Set where FunVal : (Value -> Value) -> Value PriVal : ℕ...

Showing (head . init ) = head in Agda

I'm trying to prove a simple lemma in Agda, which I think is true. If a vector has more than two elements, taking its head following taking the init is the same as taking its head immediately. I have formulated it as follows: lem-headInit : ∀{l} (xs : Vec ℕ (suc (suc l))) -> head (init xs) ≡ head xs lem-headIn...

Unsafe coerce and more efficient Agda code (-ftrust-me-im-agda)

On the Agda mailing list, Conor McBride asked: is there any way to get hold of operations like a putative trustFromJust :: Maybe x -> x which doesn't actually check for Just and Goes Wrong (in Milner's sense) if fed Nothing? Agda might prove Maybe a == Just1 a, and the intermediate constructor for the sum type could b...