Skip to content

GoI of a Church Numeral in Scheme

The denotation of λs.λz.s(sz) in the geometry of interaction.

(letrec ((* (λ (c) (cons π1 c)))
         (π23
          (λ (c)
            (π21
             (λ (n)
               (cond
                ((< n 2) (c n))
                (else (c (add1 n))))))))
         (π22
          (λ (c)
            (π24
             (λ (n)
               (cond
                ((< n 2) (c n))
                ((= n 2) 'z)
                (else (c (sub1 n))))))))
         (π25
          (λ (c)
            (π23
             (λ (n)
               (cond
                ((< n 1) (c n))
                ((= n 1) (car (c 1)))
                ((= n (add1 1)) (cdr (c 1)))
                (else (c (sub1 n))))))))
         (π24
          (λ (c)
            (π26
             (λ (n)
               (cond
                ((< n 1) (c n))
                ((= n 1) (cons (c 1) (c (add1 1))))
                (else (c (add1 n))))))))
         (π27
          (λ (c)
            (π25
             (λ (n)
               (cond
                ((< n 0) (c n))
                ((= n 0) (car (c 0)))
                ((= n (add1 0)) (cdr (c 0)))
                (else (c (sub1 n))))))))
         (π26
          (λ (c)
            (π6
             (λ (n)
               (cond
                ((< n 0) (c n))
                ((= n 0) (cons (c 0) (c (add1 0))))
                (else (c (add1 n))))))))
         (π15
          (λ (c)
            (π17
             (λ (n)
               (cond
                ((< n 0) (c n))
                ((= n 0) (car (c 0)))
                ((= n (add1 0)) (cdr (c 0)))
                (else (c (sub1 n))))))))
         (π16
          (λ (c)
            (π14
             (λ (n)
               (cond
                ((< n 0) (c n))
                ((= n 0) (cons (c 0) (c (add1 0))))
                (else (c (add1 n))))))))
         (π17
          (λ (c)
            (π19
             (λ (n)
               (cond
                ((< n 1) (c n))
                (else (c (add1 n))))))))
         (π18
          (λ (c)
            (π16
             (λ (n)
               (cond
                ((< n 1) (c n))
                ((= n 1) 's)
                (else (c (sub1 n))))))))
         (π11
          (λ (c)
            (π9
             (λ (n)
               (cond
                ((< n 0) (c n))
                (else (c (add1 n))))))))
         (π10
          (λ (c)
            (π12
             (λ (n)
               (cond
                ((< n 0) (c n))
                ((= n 0) 's)
                (else (c (sub1 n))))))))
         (π13
          (λ (c)
            ((if (eq? 'L (car (c 0))) π11 π15)
             (λ (n) (if (= n 0) (cdr (c n)) (c n))))))
         (π12
          (λ (c)
            (π3
             (λ (n) (if (= n 0) (cons 'L (c 0)) (c n))))))
         (π14
          (λ (c)
            (π3
             (λ (n) (if (= n 0) (cons 'R (c 0)) (c n))))))
         (π19
          (λ (c)
            ((if (eq? '○ (car (c 1))) π8 π22)
             (λ (n) (if (= n 1) (cdr (c n)) (c n))))))
         (π20
          (λ (c)
            (π18
             (λ (n) (if (= n 1) (cons '○ (c 1)) (c n))))))
         (π21
          (λ (c)
            (π18
             (λ (n) (if (= n 1) (cons '● (c 1)) (c n))))))
         (π9
          (λ (c)
            ((if (eq? '○ (car (c 0))) π5 π20)
             (λ (n) (if (= n 0) (cdr (c n)) (c n))))))
         (π7
          (λ (c)
            (π10
             (λ (n) (if (= n 0) (cons '○ (c 0)) (c n))))))
         (π8
          (λ (c)
            (π10
             (λ (n) (if (= n 0) (cons '● (c 0)) (c n))))))
         (π4
          (λ (c)
            ((if (eq? '○ (car (c 0))) π7 π27)
             (λ (n) (if (= n 0) (cdr (c n)) (c n))))))
         (π5
          (λ (c)
            (π2
             (λ (n) (if (= n 0) (cons '○ (c 0)) (c n))))))
         (π6
          (λ (c)
            (π2
             (λ (n) (if (= n 0) (cons '● (c 0)) (c n))))))
         (π1
          (λ (c)
            ((if (eq? '○ (car (c 0))) π4 π13)
             (λ (n) (if (= n 0) (cdr (c n)) (c n))))))
         (π2
          (λ (c)
            (*
             (λ (n) (if (= n 0) (cons '○ (c 0)) (c n))))))
         (π3
          (λ (c)
            (*
             (λ (n)
               (if (= n 0) (cons '● (c 0)) (c n)))))))
  (λ (π)
    (case π ((*) π1) (else (error "unknown port" π)))))

One Trackback/Pingback

  1. dvanhorn @ λ-calcul.us › Interacting with GoI Graphs on Wednesday, June 17, 2009 at 1:07 pm

    [...] macro use expands into the code given here.  Notice that links are implemented as recursive functions.  Traveling along a link in the graph [...]

Post a Comment

You must be logged in to post a comment.
  • Buy Cheap levitra informatrion Online 24/Online Pharmacy. Free Viagra Pills!
  • Buy Cheapest uses for amoxicillin Online Cheap Prescription Drugs. Best Internet.
  • Buy Cheapest mexican pharmacy online purchase Now Top Online Pharmacy Supplier. Best Prices.
  • Buying Cheapest zovirax order. Mexican Rx, Best Prices. Free Viagra Pills!
  • Buy Cheap azithromycin dosage Online Pharmacy Store. Cheap Pharmacy Online.
  • highest safe dose of levitra Online Without Prescription Best Online. Pharmacy Store.
  • Buy Cheap jellys sildenafil Online Best Online. Buy Medications Online.
  • Buy Cheapest order xanax no prescription Online Low Prices. Online Prices For order xanax no prescription!
  • Buy Cheapest on-line india drugstores Online Pharmacy Store. Cheap Online Pharmacy.
  • Buy Cheap prescription drug lorazepam Online Discount Online Pharmacy. Pharmacy Store.
  • Buy Cheapest vardenafil 10 mg Online Discount Pharmacy Online. Best Internet.
  • Buy Cheap levitra doses Online Online Prices For levitra doses! Pharmacy Store.
  • Buy Cheapest viagra side affects Online Best Drugstore. Free Viagra Pills!
  • Buying Cheap canada pharmacy online. Offshore Rx, Best Prices. Top Online Pharmacy.
  • appetite control supplement Online Without Prescription WorldWide Shipping. Low Prices.
  • drug store ultram Online Without Prescription Pharmacy Store. Low Prices.
  • Buy Cheap medicine avodart Now Online Medical Shop. Guaranteed Shipping.
  • Buying Cheapest valium effects. Mexican Pharmacy, Good Prices. Best Prices.
  • Buy Cheap quitting zyban Online Best Drugstore. No Prescription Needed.
  • Buy Cheapest ambien withdrawal side effect Now Best Prices. Special Prices For ambien withdrawal side effect!
  • Buy Cheap prescription appetite suppresents Now WorldWide Shipping. Guaranteed Shipping.
  • Buy Cheapest buy alprazolam cheap Now Discount Online Pharmacy. Best Drugstore.
  • Buy Cheap buspar generic Now Free Viagra Pills! Drugs, Health And Beauty.
  • Buy Cheapest cheap cialis india Now No Prescription Needed. Best Drugstore.
  • Buy Cheap success clomid Now Online Prices For success clomid! Pharmacy Store.
  • Buy Cheap fda approved adult diet pills Now Online Medical Shop. Cheap Online Pharmacy.
  • Buy Cheap viagra viagra Online Special Prices For viagra viagra! Best Online.
  • Buy Cheapest viagra without prescription Now Online Prices For viagra without prescription! Best Drugstore.
  • Buying Cheap solutions for obesity. Mexican Pharmacy, Best Prices. Best Drugstore.
  • Buy Cheap weight loss pill Now Cheap Prescription Drugs. Guaranteed Shipping.
  • Buy Cheapest cheap generic viagra Online Best Online. Online Medical Shop.
  • Buy Cheap headache medicine strongest prescription Now Free Viagra Pills! Cheap Prescription Drugs.
  • Buy Cheapest xanax online Now Best Drugstore. Online Medical Shop.
  • Buy Cheapest appetite suppressing Now Low Prices. The Largest Internet Pharmacy.
  • Buy Cheap long term anxiety treatment Now Free Viagra Pills! Cheap Online Pharmacy.
  • Buy Cheap internet pain medications Online WorldWide Shipping. Free Viagra Pills!
  • Buy Cheap order xenical online Online Pharmacy At The Best Price! Best Online.
  • Buy Cheapest xanax benefits Now Pharmacy Store. Pharmacy At The Best Price!
  • info propecia Online Without Prescription Low Prices. Best Drugstore.
  • cheap antidepressant pills Online Without Prescription Low Prices. Best Internet.
  • Buy Cheap roundworm treatment Now Free Viagra Pills! 24/Online Pharmacy.
  • Buy Cheapest effects ambien Online Best Drugstore. Top Online Pharmacy.
  • Buy Cheap treatment for rheumatoid arthritis Now Best Online. Top Online Pharmacy Supplier.
  • Buy Cheap nexium pills Now Cheap Online Pharmacy. Top Online Pharmacy.
  • Buy Cheap buy viagra in the uk Now Cheap Online Pharmacy. Guaranteed Shipping.
  • Buy Cheap valium and migraine headaches Online Best Drugstore. Online Prices For valium and migraine headaches!
  • Buy Cheap fda approved us online pharmacy valium Online Free Viagra Pills! WorldWide Shipping.
  • Buy Cheapest burn fat Now Low Prices. Pharmacy At The Best Price!
  • how to relieve ear pain Online Without Prescription Best Internet. Best Prices.
  • Buy Cheap prescription drug prices Online Best Drugstore. Special Prices For prescription drug prices!
  • Buy Cheap very cheap tramadol Now Discount Online Pharmacy. Top Online Pharmacy.
  • Buy Cheap buy canada levitra Now No Prescription Needed For Drugs. Best Online.
  • Buy Cheapest indian cialis Online No Prescription Needed. Best Online.
  • Buy discount viagra generic Without Prescription Doctor. Low Prices. Pharmacy Store.
  • Buy Cheap online prescriptions xanax valium Online Pharmacy At The Best Price! Best Internet.
  • Buy Cheapest find viagra online Now Best Drugstore. No Prescription Needed.
  • Buy ambien health Online Without Prescription. Best Prices. Best Internet.
  • Buy Cheap phentermine on line consultation Now Best Internet. Discount Online Pharmacy.
  • Buy Cheapest cialis tadalafil Online Best Internet. Online Medical Shop.
  • Buy cvs pharmacy online Without Prescription Doctor. Pharmacy Store. Low Prices.
  • Buy Cheap 2mg yellow xanax Online Best Internet. Online Prices For 2mg yellow xanax!
  • Buy Cheapest insomnia pharmacy Now Best Prices. Top Online Pharmacy Supplier.
  • Buy Cheap ultram buy ultram Online Pharmacy Store. Cheap Online Pharmacy.
  • Buy Cheapest mail order vitamin supplements Online Cheap Pharmacy Online. Low Prices.
  • Buy Cheap cialis soft tabs Online Pharmacy Store. Online Medical Shop.
  • Buy Cheap pharmacies online with lorazepam Now Online Medical Shop. Drugs, Health And Beauty.
  • Buy Cheapest phentermine with no prescription Online Internet Prices For phentermine with no prescription! Best Online.
  • Buy Cheap viagra super active Online 24/Online Pharmacy. Free Viagra Pills!
  • Buy Cheapest discount viagra generic Now 24/Internet)(safe Pharmacy. Low Prices.
  • pain pills online thailand Online Without Prescription Best Prices. Best Drugstore.
  • Buy Cheap cure for chlamydia drugs Now Cheap Online Pharmacy. 24/Online Pharmacy.
  • Buy Cheap phentermine buy online Now Buy Medications Online. Free Viagra Pills!
  • Buy Cheap ordering pain killers Now Free Viagra Pills! Cheap Pharmacy Online.
  • Buy spironolactone 25mg Online Without Prescription. Pharmacy Store. Low Prices.
  • Buy Cheapest sildenafil citrate 100mg Online Best Prices. No Prescription Needed.
  • Buy Cheap phentermine online no prescription Now 100% Satisfaction Guaranteed. Pharmacy Store.
  • Buy Cheap viagra difference in mg Online Online Medical Shop. Guaranteed Shipping.
  • Buy Cheap buy generic levitra online Online Discount Pharmacy Online. Low Prices.
  • Buy Cheap cialis profesional Now Best Online. Internet Prices For cialis profesional!
  • Buy Cheapest legal online pharmacy Now Free Viagra Pills! Online Medical Shop.
  • Buy Cheap mail order pain medication Online Best Drugstore. Discount Online Pharmacy.
  • Buy Cheap online pharmacy phenergan Online Best Internet. Discount Online Pharmacy.
  • Buy Cheap medicine cialis Now All Medications Are Certificated! Best Online.
  • Buy Cheapest buy lasix online Now Online Prices For buy lasix online! Low Prices.
  • Buy pain meds prescription free Online Without Prescription. Internet Prices For pain meds prescription free!
  • Buy Cheapest xanax cod Now Online Medical Shop. Guaranteed Shipping.
  • Buy Cheapest generic cialis soft Online Free Viagra Pills! Pharmacy Store.
  • Buy Cheap prescription weight loss medication Online Pharmacy Store. Guaranteed Shipping.
  • Buy Cheap klonopin 2mg Now Discount Online Pharmacy. Free Viagra Pills!
  • Buy Cheap effects of zoloft Now Cheap Pharmacy Online. Guaranteed Shipping.
  • Buy Cheapest canadian prescription medications Online Free Viagra Pills! Online Medical Shop.
  • Buy Cheapest order xanax Online Best Online. Top Online Pharmacy.
  • Buy Cheapest medication for anxiety Now Pharmacy Store. Pharmacy At The Best Price!
  • Buy Cheap generic sleep aid Online Best Prices. No Prescription Needed.
  • Buy Cheapest cialis super viagra Online Best Prices. Buy Medications Online.
  • Buy Cheap narcotic pain killers Online Best Internet. Cheap Pharmacy Online.
  • Buy Cheap citrate sildenafil Now Best Drugstore. Cheap Prescription Drugs.
  • Buy Cheap buy clomiphene Now Best Internet. Special Prices For buy clomiphene!
  • Buy Cheap online pain prescription Now All Medications Are Certificated! Best Prices.
  • Buy Cheapest medrol dose Online Best Online. Buy Medications Online.
  • google

    google

    asus