• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A categorical programming language


Commit MetaInfo

修订版9d5217685979ed7890a78bc374a7a9af1ca6ea67 (tree)
时间2023-03-28 05:46:40
作者Corbin <cds@corb...>
CommiterCorbin

Log Message

Add a few more rules for Booleans.

更改概述

差异

--- a/jelly/src/main.rs
+++ b/jelly/src/main.rs
@@ -223,6 +223,7 @@ fn main() -> std::io::Result<()> {
223223 // 2 = 1 + 1
224224 rw!("bool-t-either"; "(comp t either)" => "left"),
225225 rw!("bool-f-either"; "(comp f either)" => "right"),
226+ rw!("bool-not-either"; "(comp (comp not either) (case ?f ?g))" => "(comp either (case ?g ?f))"),
226227
227228 // Boolean negation
228229 rw!("bool-t-not"; "(comp t not)" => "f"),
@@ -239,6 +240,10 @@ fn main() -> std::io::Result<()> {
239240 rw!("bool-conj-t-pointed"; "(comp (pair (comp ignore t) ?b) conj)" => "?b"),
240241 rw!("bool-disj-f-pointed"; "(comp (pair (comp ignore f) ?b) disj)" => "?b"),
241242 rw!("bool-disj-t-pointed"; "(comp (pair (comp ignore t) ?b) disj)" => "(comp ignore t)"),
243+ rw!("bool-conj-dup"; "(comp dup conj)" => "id"),
244+ rw!("bool-disj-dup"; "(comp dup disj)" => "id"),
245+ rw!("bool-conj-not"; "(comp (pair not id) conj)" => "(comp ignore f)"),
246+ rw!("bool-disj-not"; "(comp (pair not id) disj)" => "(comp ignore t)"),
242247
243248 // IEEE 754 addition
244249 // f-add is symmetric