SET(Software Engineer in Test) のグループの元マネージャ。専門は ソフトウェアテスト/Lint/Git。実務経験のあるプログラミング言語は JavaScript, TypeScript, Swift, C#, Go, Isabelle, OCaml, F#(コードは OSS を参照)。
(2025/12 現在)転職活動はしていません。
SET(Software Engineer in Test) のグループの元マネージャ。専門は ソフトウェアテスト/Lint/Git。実務経験のあるプログラミング言語は JavaScript, TypeScript, Swift, C#, Go, Isabelle, OCaml, F#(コードは OSS を参照)。
(2025/12 現在)転職活動はしていません。
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "strconv" | |
| ) |
| M: ℕ (支払い金額) | |
| S: coin multiset (財布) | |
| W1, W2, W3: coin multiset (渡す貨幣) | |
| O1, O2, O3: coin multiset (お釣り) | |
| submultiset: 'a multiset ⇒ 'a multiset ⇒ bool (多重集合が包含されていれば真、そうでなければ偽) | |
| card: 'a multiset ⇒ ℕ (多重集合の要素数) | |
| norm: coin multiset ⇒ bool (貨幣の多重集合が正規形であれば真、そうでなければ偽) | |
| val: coin multiset ⇒ ℕ (貨幣の多重集合の価値) | |
| Pay(M, S, O, W) ≡ submultiset(W1, S) ∧ val(W) - val(O) = M ∧ norm(O) ∧ norm(S - W + O) (支払い関係が成立していれば真、そうでなければ偽) |
| namespace Playground.CopilotTDD; | |
| public static class NumberGenerator | |
| { | |
| public static int GetBetween0To100BySeed(int seed) | |
| { | |
| return new Random(seed).Next(0, 100); | |
| } | |
| } |
| // https://chat.openai.com/share/a75ee402-3131-4ee8-9a9d-54bf1b81071c | |
| using System; | |
| namespace Playground.CopilotTDD.Tests | |
| { | |
| public static class NumberGenerator | |
| { | |
| public static int GetBetween0To100BySeed(int seed) | |
| { | |
| // 線形合同法のパラメータ |
| theory Scratch | |
| imports Main | |
| begin | |
| no_notation relcomp (infixr "O" 75) | |
| (* oreo 型の内部表現 *) | |
| datatype oreo0 = O0 | Ore0 oreo0 | Reo0 oreo0 |
| theory "Well_Not_Dense_Order" imports Main begin | |
| context wellorder | |
| begin | |
| definition bot :: 'a | |
| where "bot ≡ LEAST x. True" | |
| sublocale order_bot bot less_eq less | |
| proof standard | |
| fix a |
| theory "Well_Dense_Order" imports Main begin | |
| datatype a = A | |
| text "a は整列順序である。" | |
| instantiation a :: wellorder | |
| begin | |
| definition less_eq_a :: "a ⇒ a ⇒ bool" | |
| where "less_eq_a a b ≡ True" |
| .. | |
| .::::. | |
| ___________ :;;;;:`____________ | |
| \_________/ ?????L \__________/ | |
| |.....| ????????> :.......' | |
| |:::::| $$$$$$"`.:::::::' , | |
| ,|:::::| $$$$"`.:::::::' .OOS. | |
| ,7D|;;;;;| $$"`.;;;;;;;' .OOO888S. | |
| .GDDD|;;;;;| ?`.;;;;;;;' .OO8DDDDDNNS. | |
| 'DDO|IIIII| .7IIIII7' .DDDDDDDDNNNF` |
| theorem | |
| fixes f :: "'x ⇒ 'y ⇒ 'y" | |
| assumes finite: "finite X" | |
| and eq: "⋀x. x ∈ X ⟹ f x = g x" | |
| shows "Finite_Set.fold f z X = Finite_Set.fold g z X" | |
| using finite using eq by (rule_tac fold_closed_eq[where ?B=UNIV]; simp) |