Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| -- Egison Version >= 3.10.0 | |
| -- $ egison -N | |
| -- > loadFile "prover1.egins" | |
| -- | |
| -- Matcher | |
| -- |
This file contains hidden or 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
| ***( | |
| > load test02.maude | |
| ) | |
| fmod NAT is | |
| sorts Zero NzNat Nat . | |
| subsort Zero NzNat < Nat . | |
| op o : -> Zero [ctor] . | |
| op s_ : Nat -> NzNat [ctor] . |
This file contains hidden or 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
| -- > Egison Version == 3.9.4 | |
| -- > egison -N | |
| -- > loadFile "rewriteNat1.egins" | |
| -- | |
| -- Utils | |
| -- |
This file contains hidden or 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
| /* | |
| https://github.com/bmstu-iu9/refal-5-lambda | |
| > chcp 65001 | |
| > srefc.bat test01.ref | |
| */ | |
| /* 先頭と末尾が同じ文字なら、それを削っていく */ | |
| Pal { | |
| = True; |
This file contains hidden or 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
| ★★★19/10/27 理解できた | |
| ★★★19/10/22 理解できなかった | |
| cpl> simp add1.pair(o, s.s.o) | |
| 0:add1.pair(o,s.s.o)*I | |
| 1[1]:pair(o,s.s.o)*I | |
| 2:add1*pair(o,s.s.o) | |
| let add1 = ev.prod(pr(cur(pi2), cur(s.ev)), nat); add1が | |
| let add3 = ev.pair(pr(cur(pi2), cur(s.ev)).pi1, pi2); add3と同じになってる | |
| 3:ev.pair(pr(cur(pi2),cur(s.ev)).pi1,pi2)*pair(o,s.s.o) | |
| 4[1]:pair(pr(cur(pi2),cur(s.ev)).pi1,pi2)*pair(o,s.s.o) |
This file contains hidden or 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
| // main.rsにコピペする | |
| // Cargo.toml | |
| // [dependencies] | |
| // num-traits = "0.2.7" | |
| // num-bigint = "0.2" | |
| extern crate num_traits; | |
| extern crate num_bigint; |
This file contains hidden or 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
| ;; > egison -N | |
| ;; > loadFile("sudoku-N.egi") | |
| def parse(str) = map(read, map(1#pack([%1]), | |
| match S.replace(".", "0", str) as string | |
| | loop($i, (1, 81, _), <cons $x_i ...>, <nil>) -> map(($i -> x_i), 1..81) )) | |
| ;; checkHintPattern | |
| def chp(n, str) = let hintValue = nth(n, parse(str)) in |
This file contains hidden or 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
| ;; > egison -N | |
| ;; > loadFile("poker-N.egi") | |
| ;;; | |
| ;;; | |
| ;;; Poker-hands demonstration | |
| ;;; | |
| ;;; | |
| ;; |
This file contains hidden or 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
| ;; > egison -N | |
| ;; > loadFile("multiOf3-N.egi") | |
| def sumMulti?(x, n2, y) = | |
| match (sum(map(($i -> x_i), 1..n2)) + y) as mod(3) | |
| | 0 -> #t | |
| | _ -> #f | |
| def afterCheck?(ans) = |