- Oct 2024
-
idris2.readthedocs.io idris2.readthedocs.io
-
pattern
so this is a difference to haskell, bc
+
is a defined function occurring in a pattern, not a constructor. Also, the pattern is non-linear. Aha, so this point is addressed later on.
-
- Sep 2024
-
www.twanvl.nl www.twanvl.nl
-
Parametrize the sorted list by a lower bound on the values it contains. For a cons cell the head should be smaller than the lower bound, and the tail should be larger than the head. This requires the type to have a smallest element, but you can adjoin -∞ with a new datatype.
this is the way it's done in "How to keep your neighbors in order"
-
-
hackage.haskell.org hackage.haskell.org
-
either recur on a smaller input
combine the results of recursive invocations on smaller input
-
-
blog.sumtypeofway.com blog.sumtypeofway.com
-
not only is this boring to write, but any future changes (such as added constructors or fields) to Expr will force us to rewrite it
making refactoring more difficult
-
core behavior
business logic
-
- Mar 2024
-
ncatlab.org ncatlab.org
-
though it is always an opfibration.
via the covariant induced Σ_f postcomposition functor
-
-
de.wikibooks.org de.wikibooks.org
-
Widerspruchsbeweis
this is only a Widerspruchsbeweis bc Kontraposition has been applied to the proof obligation 🤨
-
- Feb 2024
-
ncatlab.org ncatlab.org
-
Any property-like structure can be “algebraicized” by requiring a specific choice of the objects that are required to exist; a cleavage is this “algebraicization” for the property of being a Grothendieck fibration
like a functor for products
-
- Dec 2023
-
reasonablypolymorphic.com reasonablypolymorphic.com
-
An interesting case is that of map :: (a -> b) -> [a] -> [b]. We note that both the input and output of this function are lists, and thus might suspect the function can be written as either a catamorphism or an anamorphism. And indeed, it can be:
unless you defined
ana
/cata
usingmap
…
-
- Nov 2023
-
monospacedmonologues.com monospacedmonologues.com
-
This means that the version of Agda you’re pinning needs to align with the version of Agda installed globally.
Not necessarily. If you install the emacs package
agda2-mode
globally (which e.g. allows you to use theagda-input-method
globally), but notagda
, it will pick up the localagda
executable from the path, which you can set as described below. You might still get a mismatch between your globally installedagda-mode
and the agda version on your path, but you can executeC-c + C-x + C-s
and pass it an empty string. This callsagda2-set-program-version
and tells it to use theagda
andagda-mode
executables fromPATH
, which have the correct local versions. -
So, follow along to set up this combination of incredibly niche tools that you almost certainly have zero interest in. 😜
the fact that many readers of this blogposts probably encounter it searching for "agda" and "nix" prbly preselects an audience that almost certainly has quite a big interest in this precise combination of tools
-
-
jesper.sikanda.be jesper.sikanda.be
-
alternatively, we could have updated the bounds in the return type to ensure they include the inserted element
that one would seem to make more sense but it causes green slime. Feel like the tradeoffs should be addressed.
-
lookup
this isn't proven correct. We have
lkp x t = x \in t
, but notx \nin t <=> lkp x t = nothing
. Basically it is only a partial decision procedure for∈
-
The proofs insert-sound₂ and insert-complete
extrinsic verification
-
{{l≤u : lower ≤ upper}}
Conor also doesn't have this
-
y
does this somehow become an implicit argument? It seems so from later uses, but how do generalized variables decide when to generalize implicitly? More importantly, its type was earlier declared to be
A
, but it should be[ A ]∞
?? Ok so it appears that the generalized vars can be instantiated to different things – I don't know if at a term- or module level. Ok so if you look at the next line, already they're instantiated to something else. So apparently you can do this even at the clause level. Btw the source code for this blog can be found at https://github.com/jespercockx/agda2scheme/blob/12ff5dcaebfe38dfbfdb48d4fb97bbbe2aa792d9/test/formalize-all-the-things.agda, there doesn't seem to be alagda
file though. -
data _≤∞_ : [ A ]∞ → [ A ]∞ → Set
in the original,
[_]∞
is a function toSet
-
{{Ord-Nat}}
why is it in instance brackets in its own definition by copattern matching?
-
So (m < suc n)
this means we don't have to pattern-match on the case {m = m}, {n = zero}
-
To do this, we define an ‘instance’ that automatically constructs a proof of m ≤ n when m and n are natural number literals.
Ok so yet another redundancy where you can express your decision procedure in a different format…
-
Note how A and B are implicitly quantified in the type of mapMaybe!
Could one also write:
agda data Maybe : Set where just : A → Maybe A nothing : Maybe A
? For maximum confusion, as it were -
programs that produce proofs
this means metaprogramming, unless one says "programs that are proofs", which is just programming.
-
- Oct 2023
-
www.thefreedictionary.com www.thefreedictionary.com
-
4. To comply with the terms of (a debt or promise, for example).
this is the sense in which the word is used in "to discharge a proof obligation"
-
- Jan 2022
-
sigkill.dk sigkill.dk
-
This is a a bit of a hack, but we don’t really expect getRouteFor to ever return Nothing, as that would mean we have been asked to add a menu entry for a file that will not exist on the site.
silent failure is never good. Often 'the impossible' happens. Do sanity checks, assertions
-
- Dec 2021
-
jonreeve.com jonreeve.com
-
First time I've seen someone explicitly point out Hypothes.is! I'm currently trying to find a static site generator that will best suit me (I'm planning to make posts about Haskell and Nix in the beginning). I previously looked into https://utteranc.es/ as a comments system, but I do like the hypothes.is feature of comments being tied to particular text.
-
- Jun 2021
-
lexi-lambda.github.io lexi-lambda.github.io
-
meaning
semantics
-
no value
again, undefined? though I suppose one would have to pass it
@a
as type parameter then, to inform ghc -
completely uninhabited
except for
undefined
- and couldn't one use it iftypeOf
matches its argument with an _?
-
- Oct 2019
-
de.wikibooks.org de.wikibooks.org
-
Teilaussage
Was ist damit gemeint??
-