This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(coq.theory | |
(name notation_test) | |
(flags (:standard))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From Coq Require Import Vector. | |
Lemma foo : nat. | |
Proof. exact 1. Qed. | |
Eval compute in foo. | |
Eval vm_compute in foo. | |
Lemma bar : nat. | |
Proof. exact 1. Defined. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import Ltac. | |
Require Import ssreflect. | |
#[global] Set Nested Proofs Allowed. | |
#[global] Set Ltac Backtrace. | |
#[global] Unset SsrIdents. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cats._ | |
// A pure functional, contravariant monoidal string builder | |
sealed trait SB[A] { | |
final def render(a: A): String = { | |
val sb = new StringBuilder | |
renderInternal(sb, a) | |
sb.toString | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS_GHC -Wincomplete-patterns #-} | |
module Main where | |
{- Quick implementation of CBV evaluation for lambda calculus + some primitives + fix. -} | |
data BinOp = Add | Mul | |
deriving Show | |
evalBinOp :: BinOp -> Int -> Int -> Int | |
evalBinOp Add = (+) | |
evalBinOp Mul = (*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import Coq.Program.Tactics. | |
Require Import Coq.Unicode.Utf8. | |
Require Import Coq.Logic.ProofIrrelevance. | |
Module prop_nat. | |
Inductive N : Prop := Z : N | S : N -> N. | |
(* Auto-generated. *) | |
Fixpoint N_ind' {P : Prop} (z : P) (s : N -> P -> P) (n : N) : P := | |
match n with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ dune build --cache=disabled --display=verbose theories/lang/prelude/notations.vo &> build-normal | |
Workspace root: /Users/pgiarrusso/git-bedrock/Coq/cpp2v-core | |
disable binary cache | |
Running[0]: /Users/pgiarrusso/.opam/iris-2021-01-12.0.bbaf3eaf-coq-8.13.0/bin/ocamlc.opt -config > /var/folders/7v/g2sr0z2s2v9d_v7xv_y1zlz00000gn/T/dune6d84c5.output | |
Dune context: | |
{ name = "default" | |
; kind = "default" | |
; profile = Dyn | |
; merlin = true | |
; for_host = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import NArith ZArith PArith. | |
Ltac is_positive p := | |
lazymatch p with | |
| xI ?pa => is_positive pa | |
| xO ?pa => is_positive pa | |
| xH => idtac | |
| _ => fail | |
end. | |
Ltac is_N n := |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WHITESPACE ODDITY | |
by Paul Phillips, in eternal admiration of David Bowie, RIP | |
Bound Ctrl to Major mode | |
Bound Ctrl to Major mode | |
Read inputrc and set extdebug on | |
Bound Ctrl to Major mode (Ten, Nine, Eight, Seven, Six) | |
Connecting readline, options on (Five, Four, Three) | |
Check the syntax, may terminfo be with you (Two, One, Exec) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello scala, my old friend | |
I've come to take you home again | |
Because a feature slowly creeping | |
left me plagued with doubts and weeping | |
and the version that was tagged in the repo | |
just has to go | |
it lacks the signs of soundness | |
On sleepless nights I hacked alone | |
applying ant and other tools of stone |