Skip to content

Instantly share code, notes, and snippets.

View gebner's full-sized avatar
🐌
🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌

Gabriel Ebner gebner

🐌
🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌🐌
View GitHub Profile
these derivations will be built:
/nix/store/i7cw1vwyl0z8z5nw6r5zgngcgdcd5a7g-openjdk-8u40b27.drv
building path(s) ‘/nix/store/r5l8xfa19qnnd55i24wqb11byiqqy69i-openjdk-8u40b27’, ‘/nix/store/wl290af9v112flv2qghgmapdp6cfk7a5-openjdk-8u40b27-jre’
unpacking sources
unpacking source archive /nix/store/ww0r6ynfvys9zz59m2jq8krildiihrlh-jdk8u40-b27.tar.gz
unpacking source archive /nix/store/3q6n1zzjqk68bip7frz7d605m3il1c27-jdk8u40-b27.tar.gz
unpacking source archive /nix/store/83km313n799ki3sc9g09ildhdpsnh01s-jdk8u40-b27.tar.gz
unpacking source archive /nix/store/piig7c9aaj3bhkczxld6bsx8azychgk8-jdk8u40-b27.tar.gz
unpacking source archive /nix/store/1pqabhkydpswqzflqc9kbbl7cvfz3ipf-jdk8u40-b27.tar.gz
unpacking source archive /nix/store/xybxivlkvpmx8q75ahp60nb0mgwngncy-jdk8u40-b27.tar.gz
@gebner
gebner / verit-bomb.smt
Created July 20, 2015 06:03
toDeep SMT-LIB export for ./testing/TSTP/prover9/GRP/GRP098-1/Prover9---1109a.UNS-Ref.s.out
(set-logic QF_UF)
(declare-sort S 0)
(declare-fun b4 () S)
(declare-fun a1 () S)
(declare-fun b2 () S)
(declare-fun v3$ () S)
(declare-fun v10$ () S)
(declare-fun a2 () S)
(declare-fun divide (S S ) S)
(declare-fun c3 () S)
@gebner
gebner / prover9.ladr
Created July 29, 2015 15:12
R(0) in RNG039-1
set(quiet).
clear(auto_denials).
formulas(sos).
-f5(f9,f0(f1,f6(f4,f0(f1,f9))),f0(f1,f6(f4,f0(f1,f9)))) | -f5(f9,f0(f1,f6(f4,f0(f1,f9))),f0(f9,f0(f1,f6(f4,f0(f1,f9))))) | =(f0(f1,f6(f4,f0(f1,f9))),f0(f9,f0(f1,f6(f4,f0(f1,f9))))).
f5(f9,f0(f1,f6(f4,f0(f1,f9))),f0(f1,f6(f4,f0(f1,f9)))).
f5(f9,f0(f1,f6(f4,f0(f1,f9))),f0(f6(f4,f0(f1,f9)),f6(f4,f0(f1,f9)))).
f5(f9,f0(f1,f6(f4,f0(f1,f9))),f0(f9,f0(f1,f6(f4,f0(f1,f9))))).
-f5(f9,f0(f1,f6(f4,f0(f1,f9))),f0(f9,f0(f1,f6(f4,f0(f1,f9))))) | -f5(f9,f0(f1,f6(f4,f0(f1,f9))),f0(f6(f4,f0(f1,f9)),f6(f4,f0(f1,f9)))) | =(f0(f9,f0(f1,f6(f4,f0(f1,f9)))),f6(f4,f0(f1,f9))).
-f5(f9,f0(f1,f6(f1,f6(f4,f0(f1,f9)))),f0(f1,f6(f1,f6(f4,f0(f1,f9))))) | -f5(f9,f0(f1,f6(f1,f6(f4,f0(f1,f9)))),f0(f9,f0(f1,f6(f1,f6(f4,f0(f1,f9)))))) | =(f0(f1,f6(f1,f6(f4,f0(f1,f9)))),f0(f9,f0(f1,f6(f1,f6(f4,f0(f1,f9)))))).
f5(f9,f0(f1,f6(f1,f6(f4,f0(f1,f9)))),f0(f1,f6(f1,f6(f4,f0(f1,f9))))).
namespace gapt
open tactic expr
namespace lk
lemma LogicalAxiom {a} (main1 : a) (main2 : ¬a) : false := main2 main1
lemma BottomAxiom (main : false) : false := main
lemma TopAxiom (main : ¬true) : false := main ⟨⟩
lemma ReflexivityAxiom {α : Type} {a : α} (main : a ≠ a) : false := main (eq.refl a)
import data.stream
open list
def list_rev_bench (size : ℕ) : ℕ :=
head $ stream.iterate reverse (iota (10*size)) size
vm_eval let size := 1200 in
timeit ("list_rev_bench " ++ size^.to_string ++ ":") (list_rev_bench size)
-- standard setup
lemma they_are_isomorphic (x : false) : ℕ = (ℕ × ℕ) :=
by contradiction
def repack (x : unit → false) (y : ℕ) : ℕ × ℕ :=
cast (they_are_isomorphic (x ())) y
def proj_nat (x : unit → false) : ℕ → ℕ :=
prod.fst ∘ repack x
@gebner
gebner / hash_map_lens.lean
Last active March 14, 2017 13:42
nbuckets lens for hash_map
import data.hash_map
universes u v w
def lens (α β : Type u) :=
∀ (f : Type u → Type w) [functor f], (β → f β) → (α → f α)
def lens.compose {α β δ : Type u} (l₂ : lens α β) (l₁ : lens β δ): lens α δ :=
λ f h, @l₂ f h ∘ @l₁ f h
instance : applicative id :=
@gebner
gebner / parser2.lean
Created April 1, 2017 14:51
Parser combinators for char_buffers
import data.buffer
universes u v
inductive parse_result (α : Type u)
| done (pos : ℕ) (result : α) : parse_result
| fail (pos : ℕ) (expected : list (unit → string)) : parse_result
def parser (α : Type u) :=
∀ (input : char_buffer) (start : ℕ), parse_result α
import data.stream
universes u
/-
coinductive alternating : stream bool → Prop
| f : ∀ s, alternating (ff :: s) → alternating (tt :: ff :: s)
| t : ∀ s, alternating (tt :: s) → alternating (ff :: tt :: s)
-/
@gebner
gebner / syntax2.lean
Created July 14, 2017 20:25
Proposed syntax tree data structure for Lean
/- syntax -/
structure position :=
(line : ℕ) (column : ℕ)
structure range :=
(left : position) (right : position)
structure location :=
(file : string) (range : range)