• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

A categorical programming language


Commit MetaInfo

修订版7353729e238c5dac3466d91ae8b84594367e9caa (tree)
时间2022-04-15 10:20:34
作者Corbin <cds@corb...>
CommiterCorbin

Log Message

Add beta-uncurry rule.

更改概述

差异

--- /dev/null
+++ b/hive/monads/int-lift.cammy
@@ -0,0 +1,3 @@
1+(fun/postcomp @0)
2+
3+Lift an internal hom to a monad, given the unit of the monad.
--- /dev/null
+++ b/hive/v2/dual/about.md
@@ -0,0 +1,2 @@
1+Pairs of numbers can be interpreted as [dual
2+numbers](https://en.wikipedia.org/wiki/Dual_number).
--- /dev/null
+++ b/hive/v2/dual/e.cammy
@@ -0,0 +1,3 @@
1+(pair f-zero f-one)
2+
3+The epsilon unit.
--- /dev/null
+++ b/hive/v2/dual/mul.cammy
@@ -0,0 +1,7 @@
1+(pair
2+ (f/mulpair (comp fst fst) (comp snd fst))
3+ (f/addpair
4+ (f/mulpair (comp fst fst) (comp snd snd))
5+ (f/mulpair (comp fst snd) (comp snd fst))))
6+
7+Multiplication in the dual numbers.
--- a/jelly/src/main.rs
+++ b/jelly/src/main.rs
@@ -87,6 +87,8 @@ fn main() -> std::io::Result<()> {
8787
8888 // Cousineau, Curien, & Mauny 1987
8989 rw!("beta"; "(comp (pair (curry ?x) ?y) (uncurry id))" => "(comp (pair id ?y) ?x)"),
90+ // beta when ?x is (uncurry ...)
91+ rw!("beta-uncurry"; "(comp (pair ?x ?y) (uncurry id))" => "(comp (pair id ?y) (uncurry ?x))"),
9092
9193 rw!("nat-elim-pr"; "(pr zero succ)" => "id"),
9294 rw!("nat-unroll-pr-zero"; "(comp zero (pr ?x ?f))" => "?x"),