Skip to content

Instantly share code, notes, and snippets.

View yoshihiro503's full-sized avatar

YOSHIHIRO Imai yoshihiro503

View GitHub Profile

fialyzer の開発環境を構築する方法 2019

構築する環境

  • opam 2.0.3
  • ocaml 4.07.1
  • dune 1.7.1

準備

opam 2 のインストール

Scala Erlang
変数 x X
関数適用 f(x, y) f(X, Y)
無名関数 (x) => x+1 fun(x) -> x+1 end
変数定義 val x = 1 X = 1
if式 if(x < 1) 100
else 200
if
  N < 10 -> 100;
  true -> 200
end
パターンマッチング "1" match {
  case 1 => 100
  case 2 => 200
}
case 1 of
  1 -> 100;
  2 -> 200
end
@yoshihiro503
yoshihiro503 / Vec.v
Last active August 15, 2018 05:05
Vec 0の元は全部VNilであることの証明(see https://twitter.com/i/web/status/1027868640169717762)
Require Import JMeq.
Section Vec.
Variable A:Set.
Inductive Vec : nat -> Set :=
| VNil : Vec O
| VCons : forall n, A -> Vec n -> Vec (S n).
Lemma Vec0_is_JMeq_to_VNil : forall n (v : Vec n),
n = 0 -> JMeq v VNil.
$ opam install  coqide
The following actions will be performed:
  ∗  install conf-pkg-config    1.1             [required by conf-gtksourceview]
  ↗  upgrade coq                8.8.0 to 8.8.1  [required by coqide]
  ∗  install conf-gtksourceview 2               [required by coqide]
  ∗  install lablgtk            2.18.5          [required by coqide]
  ∗  install coqide             8.8.1         

STAND BY FARM (スタンド バイ ファーム)

海遊山楽 ゆう 銀座店

  • 日替り御膳 880円
    • 本日の魚
  • 本日の肉
/**
* 準備。Elem型
*/
abstract trait Elem {
def <=(other : Elem) : Boolean
}
case class IntElem(val i : Int) extends Elem {
override def <=(other : Elem) = other match {
case (o: IntElem) => i <= o.i
case _ => false