Skip to content

Instantly share code, notes, and snippets.

View righ1113's full-sized avatar
๐Ÿ 
Working from home

righ1113

๐Ÿ 
Working from home
View GitHub Profile
@righ1113
righ1113 / peirce.v
Created June 23, 2025 08:02
่ฟฐ่ชž่ซ–็†็‰ˆใƒ‘ใƒผใ‚นใฎๆณ•ๅ‰‡ in Coq
Lemma col: forall P Q:nat->Prop, (forall x:nat,P x -> False) -> (forall x:nat, (forall z:nat, (P z->Q z)) -> P x) -> forall x:nat, P x .
Proof.
intros.
apply (H0 x).
intros.
apply (H z) in H1.
tauto.
Qed.
@righ1113
righ1113 / river.egi
Last active May 4, 2024 04:27
ๅทๆธกใ‚Šๅ•้กŒ in Egison
--
-- River
--
-- $ egison 4.1.3
-- > loadFile "river.egi"
--
-- Data
--
@righ1113
righ1113 / bf.ex
Last active February 28, 2025 13:54
Brainf*ck in Egison
# $ iex -S mix
# > Bf.hello |> Bf.parse([]) |> Bf.run()
defmodule Bf do
# data
# Module.register_attribute(__MODULE__, :hello, persist: true)
# @hello "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++."
def hello do
'++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.'
end
@righ1113
righ1113 / 5color.egi
Last active November 12, 2023 00:10
ไบ”่‰ฒๅฎš็† in Egison
--
-- 5-color
--
-- Egison Jornal Vol.2 ใ€ŒEgison ใƒ‘ใ‚ฟใƒผใƒณใƒžใƒƒใƒใซใ‚ˆใ‚‹ใ‚ฐใƒฉใƒ•ใฎๅฝฉ่‰ฒใ€ใ‚’ new syntax ใงๆ›ธใ„ใŸใ‚‚ใฎ
--
-- $ egison 4.1.3
-- > loadFile "5color.egi"
--
@righ1113
righ1113 / Halt.idr
Last active July 5, 2023 19:55
ๅœๆญขๆ€งๅ•้กŒ in Idris
-- $ idris
-- > :l Halt
module Halt
%default total
namespace Hal
postulate H : (f : a) -> Bool
@righ1113
righ1113 / GoedelPuzzle.idr
Last active July 5, 2023 19:56
ใ‚ฒใƒผใƒ‡ใƒซใƒปใƒ‘ใ‚บใƒซ in Idris
-- ๅ‚่€ƒ่จ˜ไบ‹๏ผšhttps://qiita.com/41semicolon/items/530c0e5e4785728f7295
--
-- $ idris
-- > :l GoedelPuzzle
module GoedelPuzzle
%default total
%hide (++)
@righ1113
righ1113 / Test03.thy
Last active August 9, 2022 21:19
Isabelle ใฎ็ทด็ฟ’
theory Test03
imports Main HOL.Nat HOL.Wellfounded
begin
(*
lemma hoge220802 [simp]:
fixes F :: "nat โ‡’ bool"
and n :: nat
assumes a: "F n"
(* and b: "A โ‰  F" *)
@righ1113
righ1113 / prolog_lisp.pl
Created August 7, 2021 17:27
Prolog ใง Lisp
% Welcome to SWI-Prolog (threaded, 64 bits, version 8.3.28)
% ๅ‚่€ƒ: https://qiita.com/sym_num/items/955f47de4494f4c57ba8
% ๅฎŸ่กŒ:
% > prolog
% ?- ['./prolog_lisp.pl'].
% ?- repl.
% :- use_module(library(history)).
%Lisp in Prolog
@righ1113
righ1113 / hadwiger01.md
Last active June 1, 2022 22:17
ใ€Žๅ››่‰ฒๅ•้กŒใ‚’่งฃใใ€‚ใ€ใฎ่€ƒๅฏŸ
@righ1113
righ1113 / Esty.idr
Created February 21, 2021 05:34
ไฝ•ใ‹ใฎใ‚ฟใƒ
-- :l Esty
module Esty
%default total
%hide fib
%hide fact
syntax "sif(" [t] "," [e] ")." [bool] = ifThenElse bool t e
namespace Fun