r/agda • u/mans123456 • Apr 05 '21
I'm looking to private class in Agda
Hi,
I'm looking to someone teach me in Agda (basics and proofs ).
thanks in advance
r/agda • u/mans123456 • Apr 05 '21
Hi,
I'm looking to someone teach me in Agda (basics and proofs ).
thanks in advance
r/agda • u/3n1r0p4 • Jun 16 '19
Why Agda 2.6.0 still not in stackage? Is it possible to install it using stack?
r/agda • u/MarcoServetto • Sep 02 '22
The code below is short and readable, but it is also breaking Dafny. This seams to point to some fundamental issue, like the proof of false that affected many different theorem provers a few years ago
trait Nope { function method whoops(): () ensures false }
class Omega {
const omega: Omega -> Nope
constructor(){ omega := (o: Omega) => o.omega(o); }
}
method test() ensures false {
var o := new Omega();
ghost var _ := o.omega(o).whoops();
//false holds here!
assert 1==2;
}..\dafny> .\dafny .\test.dfy /compile:3
Dafny program verifier finished with 3 verified, 0 errors
Compiled assembly into test.dll
Program compiled successfullyTo discuss this and similar topics, check out the Unsound workshop in SPLASH 2022. Submissions are still open (extended deadline).
r/agda • u/[deleted] • Oct 08 '24
I'm struggling a bit with some very simple Float multiplication by zero lemmas, which should just be refl, but I think I'm struggling with the Floating point implementation.
Goals are currently:?0 : a ≡ 0?1 : 0 * a ≡ 0
lemma* : ∀ a b → a * b ≡ 0.0 → a ≡ 0.0lemma* a b eq = {! !}0
lemma*1 : ∀ {a} → 0.0 * a ≡ 0.0lemma*1 = {! !}1
I also see primFloatEquality but, still end up with type errors on refl.
r/agda • u/[deleted] • Feb 23 '21
Hello! I am looking for someone who can give private classes on AGDA ? Please contact me via DM
r/agda • u/Metastate_Team • Jan 29 '21
We are pleased to announce Dactylobiotus, the first developer preview release of Juvix. Juvix has been designed by Metastate and takes inspiration from Idris, F* and Agda. The aim of Juvix is to help write safer smart contracts. To this end it is built upon a broad range of ground-breaking academic research in programming language design and type theory and implements many desirable features for a smart contract programming language. This first release supports compilation to Michelson. As the Juvix language is written in a backend-agnostic fashion, future releases will support additional backends. To learn more please visit the following links: blogpost, official website, Github
Let us know if you try it and have any feedback or suggestions.
r/agda • u/Medical-Detective-33 • Mar 29 '23
Title.
I love Agda as a language and proof assistant, but sometimes I don't touch Agda for months then when I try to build a file that worked before I get a failure from the standard library.
I appreciate all of the hard work that goes into developing Agda and the standard library but I wish it wasn't so hard to work with. Stack and Cabal are light years behind Opam.
Sorry just venting. Again I love Agda as a language and proof assistant I just wish getting it to work wasn't so painful.
Edit: sorry for being overly negative. Agda has a great community and I am grateful towards the dedication people make to developing it and its ecosystem.
I hadn't changed my system or my Agda installation and when I tried to build a file that previously worked l got an error from a standard library file saying Maybe from Builtin could not be found. I've been trying to update my agda and Haskell installations.
r/agda • u/mczarnek • Sep 11 '21
I'll particularly interested in writing a new blockchain and want to know where dependent types could help improve our security but as a curiosity I'm also just interested in general.
I've seen some examples that are seen like.. huh, that's kind of a neat idea of being able to program your types. But I don't know that I've seen any that I'd actually use regularly in the real world.
r/agda • u/[deleted] • Oct 28 '17
r/agda • u/awa_cryptium_baker • Jan 22 '20
Hi Agda Redditors,
Wanted to share a new blogpost on Juvix, in case there are folks in this subreddit interested in any of the ingredients and components of the architecture.
This post, the second part of a two-part series, enumerates the various theoretical ingredients in Juvix that we think will enable it to meet these challenges, describes the current state of specification and implementation, and provides a list of further resources & instructions should you wish to learn more.
List of ingredients:
Dependent types
Usage quantisation
Whole-program optimisation & efficient execution
Resource verification
Backend parameterisation
Quick access to resources:
The full article is here: https://research.cryptium.ch/the-why-of-juvix-ingredients-architecture/
Link to GitHub: http://github.com/cryptiumlabs/juvix
Link to Language Reference: https://github.com/cryptiumlabs/juvix/blob/develop/doc/reference/language-reference.pdf
r/agda • u/sideEffffECt • Mar 20 '14
r/agda • u/destsk • Jul 10 '14
[Absolute beginner here]
Hi guys, as the title suggests, I'm having problems with checking Agda code on the terminal (don't ask me why I'm not using emacs).
So it turns out the default compiler uses the MAlonzo backend to compile/check Agda code, but the drawback is that it always requires a main function. For code such as the following, what could I write in my main function?
module First where
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
_+_ : ℕ → ℕ → ℕ
zero + m = m
(suc n) + m = suc (n + m)I'd prefer it if I could (for example) check if 2 + 3 is equal to 5 in my main function (this is similar to 'Evaluate term to normal form' in the Agda menu in emacs I guess).
Thanks for reading!
Edit: So I just figured out I should use the flag '--no-main' while compiling, which obviously works now. Still, my first question remains - how can I design a main function to return '2 + 3', or test if 2 + 3 = 5?
r/agda • u/acrylic42 • Sep 02 '20
Hello everyone! Can someone help me getting agda started on my pc Mac os/ win os either is fine. A video tutorial would be fantastic or some links as well. Thank you.
I know that
th : {P Q : Set} → (¬ Q → ¬ P) → P → Qis not provable in Agda. To prove it, I tried to transform it using Kuroda's double negation (found here):
th' : {P Q : Set} → ¬ ¬ ((¬ Q → ¬ P) → P → Q)But I haven't managed to prove it, although it is supposed to be provable in intuitionistic logic. What am I doing wrong? Thanks.
Edit: clarify.
r/agda • u/[deleted] • Dec 12 '15
r/agda • u/the-xvc • Aug 23 '22
Hi, we are looking for an experienced libraries developer to design and implement high-performance data processing libraries for Enso (https://enso.org, YC S21), a functional, hybrid visual/textual programming language with immutable memory. You will be working in an incredibly talented team with Jaroslav Tulach (founder of NetBeans, co-creator of GraalVM Truffle) and many more.
From the business perspective, Enso is a no-code interactive data transformation tool. It lets you load, blend, and analyze your data, and then automate the whole process, simply by connecting visual components together. It can be used for both in-memory data processing, as well as SQL analytics and transformations on modern data stack (ELT). Enso has the potential to disrupt the data analytics industry over the next five years. Currently, the market operates using old-fashioned, limited, and non-extensible software which has been unable to keep up with businesses as they transition to the cloud.
From a technical perspective, Enso is a purely functional, programming language with a double visual and textual syntax representation and a polyglot evaluation model. It means that you can mix other languages with Enso (Java, JavaScript, Python, R) without wrappers and with close-to-zero performance overhead.
Enso would be a great place for you if:
You're an experienced libraries developer willing to pick up a new language (Enso).
You’re any race, color, religion, gender, national origin, political affiliation, sexual orientation, marital status, disability, age.
You like to laugh.
You want to work hard, have fun doing it, and own projects from end-to-end.
You are friendly and like to collaborate.
You move fast and ask for help when needed.
You value being part of a team and a community.
You can set your ego aside because you know that good ideas can come from anywhere.
You enjoy working in public, putting yourself out there and showing your learning.
You appreciate a competitive salary.
As a Library Developer you'll be helping to shape, define and build the data analytics and blending APIs provided by Enso. Additionally, you will be help mature the language itself with input on the features needed to build out a new programming language.
We have a few particular skills that we're looking for in this role:
Experience in implementing libraries in functional languages (especially those with immutable memory model).
Solid understanding of basic algorithms and data structures.
Ability to pick up new technologies and languages.
Strong problem solving skills but willing to ask for help when needed.
Passionate about building well-structured and maintainable code.
It would be a big bonus if you had:
Interest in functional languages (Agda, Haskell, Idris, OCaml).
Interest in data science.
Experience in Java language.
Experience in SQL and database technologies.
Avoid the confidence gap. You don't have to match all of the skills above to apply!
Tell us a little bit about yourself and why you think you'd be a good fit for the role!
r/agda • u/dnkndnts • Jul 11 '15
I'm experimenting with Agda (coming from an Idris background), and I can't seem to find a way to avoid repeatedly restating implicits. For example, here is what I have to write:
record Monoid {ℓ} {t : Set ℓ} (f : t → t → t) (#0 : t) : Set ℓ where
field zero~ : ∀ a → f #0 a ≡ a
field ~zero : ∀ a → f a #0 ≡ a
field associative : Associative f
record StrictMonoid {ℓ} {t : Set ℓ} {f : t → t → t} {#0 : t} (monoid : Monoid f #0) : Set ℓ where
field noinverse : ∀ a b → f a b ≡ #0 → a ≡ #0As you can see, StrictMonoid has to basically restate the entire implicit type construction {ℓ} {t : Set ℓ} {f : t → t → t} {#0 : t} just to accept a Monoid parameter. What I want to write for StrictMonoid is this:
record StrictMonoid (monoid : Monoid f #0) : Set _ where
field noinverse : ∀ a b → f a b ≡ #0 → a ≡ #0But the type checker complains about incomplete terms. Especially for more complicated types, repeating this stuff all the time becomes really, really tedious. Is there a way around this? Is there some semantic / architectural difference with Idris here, because I can write (modulo syntax differences) the latter code block in Idris and it compiles and works. Or is Idris performing some dangerous magic which removes certain guarantees that are desired in Agda?
Thanks!
EDIT: Ok never mind, I'm just dumb. monoid is supposed to be a field.
r/agda • u/lambda_cubed_list • Jan 29 '21
postulate
x ∀-extensionality : ∀ {A : Set} {B C : A → Set} {f g : (∀ (x : A) → B x)}
→ (∀ (x : A) → f x ≡ g x)
→ f ≡ g
∀-× : (B : Tri → Set) → (∀ (x : Tri) → B x) ≃ (B aa × B bb × B cc)
∀-× B =
record
{ to = λ all → ⟨ all aa , ⟨ all bb , all cc ⟩ ⟩ --(∀ (x : Tri) → B x) → (B aa × B bb × B cc)
; from = λ{ ⟨ a , ⟨ b , c ⟩ ⟩ aa → a
; ⟨ a , ⟨ b , c ⟩ ⟩ bb → b
; ⟨ a , ⟨ b , c ⟩ ⟩ cc → c } --(B aa × B bb × B cc) → (∀ (x : Tri) → B x)
; from∘to = λ (x : (∀ (x : Tri) → B x)) → {!!}
; to∘from = λ y → refl
}
Not sure what I am doing wrong here. Any help welcome.
r/agda • u/ellipticcode0 • Dec 28 '19
Can Agda prove any theorems in the Universe?
r/agda • u/LogicMonad • Feb 27 '20
I've been trying to formalize the isomorphism between the least fixpoint of Maybe and ℕ in Agda. However, I get stuck because of the higher order function I've used to define the least fixpoint.
Is my encoding of `Mu` correct? How do I use function extensionality in this environment?
data Mu (F : Set → Set) : Set1 where
mu : (∀ {A : Set} → (F A → A) → A) → Mu F
record _~_ {l l' : Level} (A : Set l) (B : Set l') : Set (l ⊔ l') where
field
to : A → B
from : B → A
from-to : ∀ (a : A) → from (to a) ≡ a
to-from : ∀ (b : B) → to (from b) ≡ b
_ : Mu Maybe ~ ℕ
_ = record
{ to = to
; from = from
; from-to = from-to
; to-from = to-from
}
where
to : Mu Maybe → ℕ
to (mu f) = f λ { (just n) → suc n ; nothing → zero }
from : ℕ → Mu Maybe
from zero = mu (λ f → f nothing)
from (suc n) with from n
... | mu f = mu (λ f' → f' (just (f f')))
from-to : (a : Mu Maybe) → from (to a) ≡ a
from-to (mu f) with f λ { (just n) → suc n ; nothing → zero }
... | zero = ?
... | suc n = ?
to-from : (b : ℕ) → to (from b) ≡ b
to-from zero = refl
to-from (suc n) = ?