<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-14094</id>
	<title>Nabble - Epigram</title>
	<updated>2008-09-22T10:20:49Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Epigram-f14094.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Epigram-f14094.html" />
	<subtitle type="html">Epigram is a dependently typed programming language and an interactive programming environment. Epigram has got a type system which is strong enough to express the behaviour of programs, the type checker then guarantees that the program is well behaved.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-19612742</id>
	<title>A Text editor for Epigram</title>
	<published>2008-09-22T10:20:49Z</published>
	<updated>2008-09-22T10:20:49Z</updated>
	<author>
		<name>Eric-287</name>
	</author>
	<content type="html">Dear all,
&lt;br&gt;&lt;br&gt;As a result of my experiences trying to use Epigram, I would like to 
&lt;br&gt;have a go at writing nicer editor for Epigram programming. I am 
&lt;br&gt;currently studying the &amp;quot;View from the Left&amp;quot; papers and wondered what 
&lt;br&gt;other sources one might consult?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Eric Macalay.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/A-Text-editor-for-Epigram-tp19612742p19612742.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18193107</id>
	<title>CFP: Dependently Typed Programming (FI Special Issue)</title>
	<published>2008-06-30T03:47:22Z</published>
	<updated>2008-06-30T03:47:22Z</updated>
	<author>
		<name>Thorsten Altenkirch</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Tarmo and I are editing a special issue on dependently typed &amp;nbsp;
&lt;br&gt;programming and it would be nice to have papers on Epigram (either on &amp;nbsp;
&lt;br&gt;the system and its implementation or on applications). So please get &amp;nbsp;
&lt;br&gt;writing...
&lt;br&gt;&lt;br&gt;It would help with our planning if you could let us know in advance &amp;nbsp;
&lt;br&gt;whether you plan to submit a paper (let's say end by end of July).
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Thorsten &amp; Tarmo
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Call for Papers:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Special Issue of Fundamenta Informaticae
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (&lt;a href=&quot;http://fi.mimuw.edu.pl/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://fi.mimuw.edu.pl/&lt;/a&gt;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dependently Typed Programming
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(&lt;a href=&quot;http://sneezy.cs.nott.ac.uk/darcs/DTP08/journal.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sneezy.cs.nott.ac.uk/darcs/DTP08/journal.html&lt;/a&gt;)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Editors:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thorsten Altenkirch (Nottingham)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Tarmo Uustalu (Tallinn)
&lt;br&gt;&lt;br&gt;Dependently typed programming is using the power of dependent types to
&lt;br&gt;capture relationships between data, internalising invariants necessary
&lt;br&gt;for appropriate computation. When data describe types, we can express
&lt;br&gt;patterns of programming in code. To capture this potential a number of
&lt;br&gt;languages have been proposed and implemented which incorporate some
&lt;br&gt;aspects of dependent types, e.g. Agda, ATS, Cayenne, Coq's CIC,
&lt;br&gt;Concoqtion, DML, Delphin, ELF, Epigram, Omega, OpTT, Pie, PiSigma, &amp;nbsp;
&lt;br&gt;Ynot for
&lt;br&gt;a non-exhaustive list.
&lt;br&gt;&lt;br&gt;Within the European TYPES project we have organized two workshops to
&lt;br&gt;discuss aspects of dependently programming:
&lt;br&gt;&lt;br&gt;- EffTT, Workshop on Effects and Type Theory
&lt;br&gt;&lt;a href=&quot;http://cs.ioc.ee/efftt/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cs.ioc.ee/efftt/&lt;/a&gt;&lt;br&gt;Tallinn, Estonia, December 2007
&lt;br&gt;&lt;br&gt;- DTP08, Dependently Typed Programming 2008
&lt;br&gt;&lt;a href=&quot;http://sneezy.cs.nott.ac.uk/darcs/DTP08/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sneezy.cs.nott.ac.uk/darcs/DTP08/&lt;/a&gt;&lt;br&gt;Nottingham, UK, February 2008
&lt;br&gt;&lt;br&gt;The special issue is motivated by the desire to give people who have
&lt;br&gt;presented their ideas at those workshops the opportunity to publish
&lt;br&gt;papers on their work. However, we would like to invite everybody
&lt;br&gt;working in this area to submit papers to the special issue. For a more
&lt;br&gt;complete list of topics, please consult the workshop pages following
&lt;br&gt;the links above.
&lt;br&gt;&lt;br&gt;The paper should follow the usual standards of journal papers, and
&lt;br&gt;should be submitted by email (preferable pdf) to one of the editors
&lt;br&gt;before 1 October 2008. We expect that the papers don't exceed 20 pages
&lt;br&gt;(see the FI webpage for style files). We hope to be able to stick to
&lt;br&gt;the following schedule:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Deadline for submissions:		1 October 08
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Notification of acceptance:		15 January 2009
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Final versions due:			 15 March 2009
&lt;br&gt;&lt;br&gt;This message has been checked for viruses but the contents of an attachment
&lt;br&gt;may still contain software viruses, which could damage your computer system:
&lt;br&gt;you are advised to perform your own checks. Email communications with the
&lt;br&gt;University of Nottingham may be monitored as permitted by UK legislation.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/CFP%3A-Dependently-Typed-Programming-%28FI-Special-Issue%29-tp18193107p18193107.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-16788187</id>
	<title>Re: Why does Epigram colors Branches brown?</title>
	<published>2008-04-19T14:50:25Z</published>
	<updated>2008-04-19T14:50:25Z</updated>
	<author>
		<name>Wouter Swierstra</name>
	</author>
	<content type="html">Hi Serguey,
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ( &amp;nbsp; X : * &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( X : * ; &amp;nbsp;subs : List (Tup X (Bush X)) !
&lt;br&gt;&amp;gt; data !------------! &amp;nbsp;where !---------------------------------------!
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; ! Bush X : * ) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Branches subs : Bush X &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Tup is a tuple, List is a list.
&lt;br&gt;&lt;br&gt;This is a limitation in Epigram's current treatment of data types. If &amp;nbsp;
&lt;br&gt;recursive occurrences of Bush occur within other types (like List or &amp;nbsp;
&lt;br&gt;Tup in your example), Epigram cannot tell that the data type is &amp;nbsp;
&lt;br&gt;strictly positive. You can find more about this in Peter Morris's &amp;nbsp;
&lt;br&gt;thesis:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.cs.nott.ac.uk/~pwm/thesis.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cs.nott.ac.uk/~pwm/thesis.pdf&lt;/a&gt;&lt;br&gt;&lt;br&gt;I'm not entirely sure what's going on in your other question regarding &amp;nbsp;
&lt;br&gt;implicit arguments.
&lt;br&gt;&lt;br&gt;In the meantime, I'd recommend you have a look at Agda:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://appserv.cs.chalmers.se/users/ulfn/wiki/agda.php?n=Main.HomePage&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://appserv.cs.chalmers.se/users/ulfn/wiki/agda.php?n=Main.HomePage&lt;/a&gt;&lt;br&gt;&lt;br&gt;At the moment, it's much better supported than Epigram and has a very &amp;nbsp;
&lt;br&gt;similar type theory. It can handle things like you Bush data type, for &amp;nbsp;
&lt;br&gt;example.
&lt;br&gt;&lt;br&gt;Hope this helps,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Wouter
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Why-does-Epigram-colors-Branches-brown--tp16783188p16788187.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-16783842</id>
	<title>And a question on UniqList.</title>
	<published>2008-04-19T07:37:13Z</published>
	<updated>2008-04-19T07:37:13Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">Why there are explicit p:So (...) in
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ( u : A ; &amp;nbsp;us : UniqList A eq xs ; &amp;nbsp;p : So (not (elem u xs eq)) !
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; !---------------------------------------------------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ulCons u us p : UniqList A eq (cons x xs) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&lt;br&gt;?
&lt;br&gt;&lt;br&gt;I, actually, tried to make it implicit, but failed. And I cannot figure why.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/And-a-question-on-UniqList.-tp16783842p16783842.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-16783188</id>
	<title>Why does Epigram colors Branches brown?</title>
	<published>2008-04-19T06:25:44Z</published>
	<updated>2008-04-19T06:25:44Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">&amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; X : * &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( X : * ; &amp;nbsp;subs : List (Tup X (Bush X)) !
&lt;br&gt;data !------------! &amp;nbsp;where !---------------------------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! Bush X : * ) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Branches subs : Bush X &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&lt;br&gt;Tup is a tuple, List is a list.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Why-does-Epigram-colors-Branches-brown--tp16783188p16783188.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-16201530</id>
	<title>Equality.</title>
	<published>2008-03-21T09:00:39Z</published>
	<updated>2008-03-21T09:00:39Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">I have type Char = cA | cB | cC | ... | cZ.
&lt;br&gt;&lt;br&gt;If I decide to write charEq (a,b:Char ---- charEq a b:Bool) in
&lt;br&gt;straightforward way, I will be quickly lost in details (26^2
&lt;br&gt;variants).
&lt;br&gt;&lt;br&gt;I tried use of refl, but cannot put it properly: let (a,b:Char; _p :
&lt;br&gt;Eq a b ---- charEq a b _p:Bool) and then use &amp;lt;= case _p does not do
&lt;br&gt;any good to me.
&lt;br&gt;&lt;br&gt;I tried to figure out a type that represents equality in (eq a: EqX a
&lt;br&gt;a) and inequality in some other constructor, but failed.
&lt;br&gt;&lt;br&gt;So the question is: is there any way to express equality like charEq shortly?
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Equality.-tp16201530p16201530.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15857361</id>
	<title>CFP: PLMMS 2008</title>
	<published>2008-03-05T10:30:17Z</published>
	<updated>2008-03-05T10:30:17Z</updated>
	<author>
		<name>Jacques Carette</name>
	</author>
	<content type="html">[Two Epigram people are already involved, let's hope for more!]
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SECOND CALL FOR PAPERS
&lt;br&gt;&lt;br&gt;&amp;nbsp; * UPDATE: Post-workshop proceedings in Journal of Automated Reasoning
&lt;br&gt;&amp;nbsp; * UPDATE: Invited talk by Conor McBride
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Second Workshop on
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Programming Languages for Mechanized Mathematics
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (PLMMS 2008)
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://events.cs.bham.ac.uk/cicm08/workshops/plmms/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://events.cs.bham.ac.uk/cicm08/workshops/plmms/&lt;/a&gt;&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; As part of CICM / Calculemus 2008
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Birmingham, UK, 28-29 July 2008
&lt;br&gt;&lt;br&gt;&lt;br&gt;This workshop is focused on the intersection of programming languages
&lt;br&gt;(PL) and mechanized mathematics systems (MMS). The latter category
&lt;br&gt;subsumes present-day computer algebra systems (CAS), interactive proof
&lt;br&gt;assistants (PA), and automated theorem provers (ATP), all heading
&lt;br&gt;towards fully integrated mechanized mathematical assistants that are
&lt;br&gt;expected to emerge eventually (cf. the objective of Calculemus).
&lt;br&gt;&lt;br&gt;The two subjects of PL and MMS meet in the following topics, which are
&lt;br&gt;of particular interest to this workshop:
&lt;br&gt;&lt;br&gt;&amp;nbsp; * Dedicated input languages for MMS: covers all aspects of languages
&lt;br&gt;&amp;nbsp; &amp;nbsp; intended for the user to deploy or extend the system, both
&lt;br&gt;&amp;nbsp; &amp;nbsp; algorithmic and declarative ones. Typical examples are tactic
&lt;br&gt;&amp;nbsp; &amp;nbsp; definition languages such as Ltac in Coq, mathematical proof
&lt;br&gt;&amp;nbsp; &amp;nbsp; languages as in Mizar or Isar, or specialized programming
&lt;br&gt;&amp;nbsp; &amp;nbsp; languages built into CA systems. Of particular interest are the
&lt;br&gt;&amp;nbsp; &amp;nbsp; semantics of those languages, especially when current ones are
&lt;br&gt;&amp;nbsp; &amp;nbsp; untyped.
&lt;br&gt;&lt;br&gt;&amp;nbsp; * Mathematical modeling languages used for programming: covers the
&lt;br&gt;&amp;nbsp; &amp;nbsp; relation of logical descriptions vs. algorithmic content. For
&lt;br&gt;&amp;nbsp; &amp;nbsp; instance the logic of ACL2 extends a version of Lisp, that of Coq
&lt;br&gt;&amp;nbsp; &amp;nbsp; is close to Haskell, and some portions of HOL are similar to ML
&lt;br&gt;&amp;nbsp; &amp;nbsp; and Haskell, while Maple tries to do both simultaneously. Such
&lt;br&gt;&amp;nbsp; &amp;nbsp; mathematical languages offer rich specification capabilities,
&lt;br&gt;&amp;nbsp; &amp;nbsp; which are rarely available in regular programming languages. How
&lt;br&gt;&amp;nbsp; &amp;nbsp; can programming benefit from mathematical concepts, without
&lt;br&gt;&amp;nbsp; &amp;nbsp; limiting mathematics to the computational worldview?
&lt;br&gt;&lt;br&gt;&amp;nbsp; * Programming languages with mathematical specifications: covers
&lt;br&gt;&amp;nbsp; &amp;nbsp; advanced &amp;quot;mathematical&amp;quot; concepts in programming languages that
&lt;br&gt;&amp;nbsp; &amp;nbsp; improve the expressive power of functional specifications, type
&lt;br&gt;&amp;nbsp; &amp;nbsp; systems, module systems etc. Programming languages with dependent
&lt;br&gt;&amp;nbsp; &amp;nbsp; types are of particular interest here, as is intentionality vs
&lt;br&gt;&amp;nbsp; &amp;nbsp; extensionality.
&lt;br&gt;&lt;br&gt;&amp;nbsp; * Language elements for program verification: covers specific means
&lt;br&gt;&amp;nbsp; &amp;nbsp; built into a language to facilitate correctness proofs using MMS.
&lt;br&gt;&amp;nbsp; &amp;nbsp; For example, logical annotations within programs may be turned
&lt;br&gt;&amp;nbsp; &amp;nbsp; into verification conditions to be solved in a proof assistant
&lt;br&gt;&amp;nbsp; &amp;nbsp; eventually. How need MMS and PL to be improved to make this work
&lt;br&gt;&amp;nbsp; &amp;nbsp; conveniently and in a mathematically appealing way?
&lt;br&gt;&lt;br&gt;These issues have a very colorful history. Many PL innovations first
&lt;br&gt;appeared in either CA or proof systems first, before migrating into
&lt;br&gt;more mainstream programming languages. Some examples include type
&lt;br&gt;inference, dependent types, generics, term-rewriting, first-class
&lt;br&gt;types, first-class expressions, first-class modules, code extraction
&lt;br&gt;etc. However, such innovations were never aggressively pursued by
&lt;br&gt;builders of MMS, but often reconstructed by programming language
&lt;br&gt;researchers. This workshop is an opportunity to present the latest
&lt;br&gt;innovations in MMS design that may be relevant to future programming
&lt;br&gt;languages, or conversely novel PL principles that improve upon
&lt;br&gt;implementation and deployment of MMS.
&lt;br&gt;&lt;br&gt;We also want to critically examine what has worked, and what has not.
&lt;br&gt;Why are all the languages of mainstream CA systems untyped? Why are the
&lt;br&gt;(strongly typed) proof assistants so much harder to use than a typical
&lt;br&gt;CAS? What forms of polymorphism exist in mathematics? What forms of
&lt;br&gt;dependent types may be used in mathematical modeling? How can MMS
&lt;br&gt;regain the upper hand on issues of &amp;quot;genericity&amp;quot; and &amp;quot;modularity&amp;quot;? What
&lt;br&gt;are the biggest barriers to using a more mainstream language as a host
&lt;br&gt;language for a CAS or PA/ATP?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Invited Talk
&lt;br&gt;------------
&lt;br&gt;&lt;br&gt;Conor McBride (Alta Systems, Northern Ireland) will give an invited
&lt;br&gt;talk.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Submission
&lt;br&gt;----------
&lt;br&gt;&lt;br&gt;Submission works through EasyChair
&lt;br&gt;&lt;a href=&quot;http://www.easychair.org/conferences/?conf=plmms2008&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.easychair.org/conferences/?conf=plmms2008&lt;/a&gt;&lt;br&gt;&lt;br&gt;Two kinds of papers will be considered:
&lt;br&gt;&lt;br&gt;&amp;nbsp;* Full research papers may be up to 12 pages long. Authors of
&lt;br&gt;&amp;nbsp; &amp;nbsp;accepted papers are expected to present their work on the workshop
&lt;br&gt;&amp;nbsp; &amp;nbsp;in a regular talk.
&lt;br&gt;&lt;br&gt;&amp;nbsp;* Position papers may be up to 4 pages long. The workshop
&lt;br&gt;&amp;nbsp; &amp;nbsp;presentation of accepted position papers consists of two parts: a
&lt;br&gt;&amp;nbsp; &amp;nbsp;stimulating statement of certain issues or challenges by the
&lt;br&gt;&amp;nbsp; &amp;nbsp;author, followed by a discussion in the plenum.
&lt;br&gt;&lt;br&gt;Papers should use the usual ENTCS style &lt;a href=&quot;http://www.entcs.org/prelim.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.entcs.org/prelim.html&lt;/a&gt;&lt;br&gt;(11 point version), and will be reviewed by the program
&lt;br&gt;committee. Informal workshop proceedings will be circulated as a
&lt;br&gt;technical report.
&lt;br&gt;&lt;br&gt;Moreover there will be post-workshop proceedings of improved research
&lt;br&gt;papers, or position papers that have been completed into full papers,
&lt;br&gt;to appear in a special issue of the Journal of Automated Reasoning.
&lt;br&gt;There will be a separate submission and review phase for this, where
&lt;br&gt;papers from both PLMMS 2007 and 2008 will be considered.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Programme Committee
&lt;br&gt;-------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Jacques Carette (Co-Chair) (McMaster University, Canada)
&lt;br&gt;&amp;nbsp; &amp;nbsp;John Harrison &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Intel Corporation, USA)
&lt;br&gt;&amp;nbsp; &amp;nbsp;Hugo Herbelin &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(INRIA, Ecole polytechnique, France)
&lt;br&gt;&amp;nbsp; &amp;nbsp;James McKinna &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Radboud University Nijmegen, Netherlands)
&lt;br&gt;&amp;nbsp; &amp;nbsp;Ulf Norell &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (Chalmers University, Sweden)
&lt;br&gt;&amp;nbsp; &amp;nbsp;Bill Page
&lt;br&gt;&amp;nbsp; &amp;nbsp;Christophe Raffalli &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Universite de Savoie, France)
&lt;br&gt;&amp;nbsp; &amp;nbsp;Josef Urban &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Charles University, Czech Republic)
&lt;br&gt;&amp;nbsp; &amp;nbsp;Stephen Watt &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (ORCCA, University of Western Ontario, Canada)
&lt;br&gt;&amp;nbsp; &amp;nbsp;Makarius Wenzel (Co-Chair) (Technische Universitaet Muenchen, Germany)
&lt;br&gt;&amp;nbsp; &amp;nbsp;Freek Wiedijk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(Radboud University Nijmegen, Netherlands)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Important Dates
&lt;br&gt;---------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; * Submission deadline - 5 May 2008
&lt;br&gt;&amp;nbsp; * Notification of acceptance - 6 June 2008
&lt;br&gt;&amp;nbsp; * Final version - 7 July 2008 (approximately)
&lt;br&gt;&amp;nbsp; * Workshop - 28-29 July 2008
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/CFP%3A-PLMMS-2008-tp15857361p15857361.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15830467</id>
	<title>Re: wList definition, reloaded.</title>
	<published>2008-03-04T07:48:37Z</published>
	<updated>2008-03-04T07:48:37Z</updated>
	<author>
		<name>peter morris-2</name>
	</author>
	<content type="html">Hi again, (sorry about the blank reply a second ago)&lt;br&gt;&lt;br&gt;You are on the right track, the correct statement of the oh2 constructor would look like this, however:&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a : A&lt;br&gt;-----------------------------&lt;br&gt;
oh2 a : So2 (Just a)&lt;br&gt;&lt;br&gt;You can&amp;#39;t say &amp;#39;justA : (Just a)&amp;#39; because &amp;#39;Just a&amp;#39; is not a type. Luckily you can do the indexing directly, as show above.&lt;br&gt;&lt;br&gt;Hope this helps,&lt;br&gt;&lt;br&gt;Peter&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;span class=&quot;gmail_quote&quot;&gt;On 04/03/2008, &lt;b class=&quot;gmail_sendername&quot;&gt;Peter Morris&lt;/b&gt; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=15830467&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;morrispwj@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div&gt;&lt;span class=&quot;e&quot; id=&quot;q_1187a75f763e28bf_0&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;span class=&quot;gmail_quote&quot;&gt;On 04/03/2008, &lt;b class=&quot;gmail_sendername&quot;&gt;Serguey Zefirov&lt;/b&gt; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=15830467&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sergueyz@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

Being not satisfied with solution I spun from thin air I decided to&lt;br&gt; reimplement it once again.&lt;br&gt; &lt;br&gt; If I could invent a type So2 indexed by (Maybe a) type, I could get&lt;br&gt; the following more appropriate definitions of wNil and wCons (Haskell&lt;br&gt;

 style):&lt;br&gt; wNil = W Nothing notSo2&lt;br&gt; wCons a as = W (Just a) (lam p =&amp;gt; as)&lt;br&gt; &lt;br&gt; But I cannot get a type, indexed by Maybe:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( A : * ;&amp;nbsp;&amp;nbsp;a : Maybe A !&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;( a : A ;&amp;nbsp;&amp;nbsp;justA : (Just a) !&lt;br&gt; data !----------------------!&amp;nbsp;&amp;nbsp;where !---------------------------!&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;So2 a : *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oh2 : So2 justA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;br&gt; &lt;br&gt; Epigram colors a whole definition in light brown and (Just a) in an&lt;br&gt; even more brown color. I think it tells me that I am wrong, but I&lt;br&gt; cannot understand why.&lt;br&gt;

 &lt;br&gt; Again.&lt;br&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/wList-definition%2C-reloaded.-tp15827161p15830467.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15830410</id>
	<title>Re: wList definition, reloaded.</title>
	<published>2008-03-04T07:43:14Z</published>
	<updated>2008-03-04T07:43:14Z</updated>
	<author>
		<name>peter morris-2</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;span class=&quot;gmail_quote&quot;&gt;On 04/03/2008, &lt;b class=&quot;gmail_sendername&quot;&gt;Serguey Zefirov&lt;/b&gt; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=15830410&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sergueyz@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Being not satisfied with solution I spun from thin air I decided to&lt;br&gt; reimplement it once again.&lt;br&gt; &lt;br&gt; If I could invent a type So2 indexed by (Maybe a) type, I could get&lt;br&gt; the following more appropriate definitions of wNil and wCons (Haskell&lt;br&gt;
 style):&lt;br&gt; wNil = W Nothing notSo2&lt;br&gt; wCons a as = W (Just a) (lam p =&amp;gt; as)&lt;br&gt; &lt;br&gt; But I cannot get a type, indexed by Maybe:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( A : * ;&amp;nbsp;&amp;nbsp;a : Maybe A !&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;( a : A ;&amp;nbsp;&amp;nbsp;justA : (Just a) !&lt;br&gt; data !----------------------!&amp;nbsp;&amp;nbsp;where !---------------------------!&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;So2 a : *&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oh2 : So2 justA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;)&lt;br&gt; &lt;br&gt; Epigram colors a whole definition in light brown and (Just a) in an&lt;br&gt; even more brown color. I think it tells me that I am wrong, but I&lt;br&gt; cannot understand why.&lt;br&gt;
 &lt;br&gt; Again.&lt;br&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/wList-definition%2C-reloaded.-tp15827161p15830410.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15827161</id>
	<title>wList definition, reloaded.</title>
	<published>2008-03-04T05:11:06Z</published>
	<updated>2008-03-04T05:11:06Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">Being not satisfied with solution I spun from thin air I decided to
&lt;br&gt;reimplement it once again.
&lt;br&gt;&lt;br&gt;If I could invent a type So2 indexed by (Maybe a) type, I could get
&lt;br&gt;the following more appropriate definitions of wNil and wCons (Haskell
&lt;br&gt;style):
&lt;br&gt;wNil = W Nothing notSo2
&lt;br&gt;wCons a as = W (Just a) (lam p =&amp;gt; as)
&lt;br&gt;&lt;br&gt;But I cannot get a type, indexed by Maybe:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( A : * ; &amp;nbsp;a : Maybe A ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( a : A ; &amp;nbsp;justA : (Just a) !
&lt;br&gt;data !----------------------! &amp;nbsp;where !---------------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; &amp;nbsp;So2 a : * &amp;nbsp; &amp;nbsp; &amp;nbsp; ) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; &amp;nbsp;oh2 : So2 justA &amp;nbsp; &amp;nbsp; &amp;nbsp;)
&lt;br&gt;&lt;br&gt;Epigram colors a whole definition in light brown and (Just a) in an
&lt;br&gt;even more brown color. I think it tells me that I am wrong, but I
&lt;br&gt;cannot understand why.
&lt;br&gt;&lt;br&gt;Again.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/wList-definition%2C-reloaded.-tp15827161p15827161.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15822239</id>
	<title>wList again.</title>
	<published>2008-03-04T00:03:40Z</published>
	<updated>2008-03-04T00:03:40Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">(sorry for probable accidental unfinished post)
&lt;br&gt;&lt;br&gt;These exercises are exciting. They shift my paradigm far, far away. ;)
&lt;br&gt;&lt;br&gt;Did I described wList correctly now?
&lt;br&gt;&lt;br&gt;If so, I still cannot get construction like wCons a as =&amp;gt; Sup true
&lt;br&gt;(lam p =&amp;gt; as). Right now it's beyond my comprehension.
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( a : A ; &amp;nbsp;b : Bool ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; &amp;nbsp; &amp;nbsp; a : A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;!
&lt;br&gt;data !-------------------! &amp;nbsp;where !--------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp;So1 a b : * &amp;nbsp; &amp;nbsp;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! oh1 a : So1 A true )
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( p : So1 A false !
&lt;br&gt;let &amp;nbsp;!-----------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp;notSo1 p : X &amp;nbsp; )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;notSo1 p &amp;lt;= case p
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; &amp;nbsp;A : * &amp;nbsp; &amp;nbsp;!
&lt;br&gt;let &amp;nbsp;!-------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wList A : * )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wList A =&amp;gt; W Bool (So1 A)
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; &amp;nbsp; A : * &amp;nbsp; &amp;nbsp; &amp;nbsp;!
&lt;br&gt;let &amp;nbsp;!----------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wNil : wList A )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wNil =&amp;gt; Sup false notSo1
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( a : A ; &amp;nbsp;as : wList A !
&lt;br&gt;let &amp;nbsp;!-----------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wCons a as : wList A &amp;nbsp;)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wCons a as =&amp;gt; Sup true (lam p =&amp;gt; as)
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/wList-again.-tp15822239p15822239.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15821918</id>
	<title>wList again.</title>
	<published>2008-03-03T23:41:14Z</published>
	<updated>2008-03-03T23:41:14Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">These exercises are just exciting. This is the most interesting
&lt;br&gt;paradigm shift I experienced in 8 years. ;)
&lt;br&gt;&lt;br&gt;Did I described wList
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( a : A ; &amp;nbsp;b : Bool ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; &amp;nbsp; &amp;nbsp; a : A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;!
&lt;br&gt;data !-------------------! &amp;nbsp;where !--------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp;So1 a b : * &amp;nbsp; &amp;nbsp;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! oh1 a : So1 A true )
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( p : So1 A false !
&lt;br&gt;let &amp;nbsp;!-----------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp;notSo1 p : X &amp;nbsp; )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;notSo1 p &amp;lt;= case p
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; &amp;nbsp;A : * &amp;nbsp; &amp;nbsp;!
&lt;br&gt;let &amp;nbsp;!-------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wList A : * )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wList A =&amp;gt; W Bool (So1 A)
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( a : A ; &amp;nbsp;as : wList A !
&lt;br&gt;let &amp;nbsp;!-----------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wCons a as : wList A &amp;nbsp;)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wCons a as =&amp;gt; Sup true (lam p =&amp;gt; as)
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/wList-again.-tp15821918p15821918.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15760790</id>
	<title>Re: Transpose again</title>
	<published>2008-02-29T07:14:51Z</published>
	<updated>2008-02-29T07:14:51Z</updated>
	<author>
		<name>Conor McBride-2</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;Mea culpa, I suspect. I haven't checked, but it looks like
&lt;br&gt;you've run into one of the known bugs. It's annoying, but
&lt;br&gt;there's a workaround.
&lt;br&gt;&lt;br&gt;The trouble is the dog that doesn't bark...
&lt;br&gt;&lt;br&gt;On 29 Feb 2008, at 14:16, Serguey Zefirov wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I decided to write transpose with implicit parameters. And get &amp;nbsp;
&lt;br&gt;&amp;gt; stuck, as usual.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is partial code:
&lt;br&gt;&amp;gt; --------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;( n : Nat ; &amp;nbsp;m : Nat ; &amp;nbsp;xys : Vec n (Vec m X) !
&lt;br&gt;&amp;gt; let &amp;nbsp;!---------------------------------------------!
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp;transpose _n _m xys : Vec m (Vec n X) &amp;nbsp; &amp;nbsp;)
&lt;br&gt;&lt;br&gt;...where does X go? Inconsistently with the notation,
&lt;br&gt;Epigram is actually adding X as an implicit argument
&lt;br&gt;as far left as possible. I know it looks like you're
&lt;br&gt;signalling that n and m should come first and second,
&lt;br&gt;but actually what happens just now is that code which
&lt;br&gt;manages rules puts X first.
&lt;br&gt;&lt;br&gt;So, here,
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;transpose _ n _ m xys &amp;lt;= rec xys
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ transpose _ n _ m xys &amp;lt;= case xys
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ transpose _ n _ zero vnil [&amp;lt;= case _n]
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;transpose _ n _ (suc m) (vcons xy xys) []
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;n and m refer to the first and second arguments,
&lt;br&gt;and if you look in the Horace buffer (an often
&lt;br&gt;neglected source of information!) you'll probably
&lt;br&gt;see an unexpected n : * which may confirm my
&lt;br&gt;suspicions.
&lt;br&gt;&lt;br&gt;The workaround is to declare the order of arguments
&lt;br&gt;explicitly. I'd write
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ( &amp;nbsp;n ; &amp;nbsp;m ; &amp;nbsp;X ; &amp;nbsp;xys : Vec n (Vec m X) &amp;nbsp; !
&lt;br&gt;let &amp;nbsp;!-----------------------------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ! &amp;nbsp;transpose _n _m xys : Vec m (Vec n X) &amp;nbsp;)
&lt;br&gt;&lt;br&gt;Epigram will figure out the types of n, m and X
&lt;br&gt;without difficulty, and it will use the order of
&lt;br&gt;arguments n m X xys, with n, m and X hidden by
&lt;br&gt;default at usage sites, and n and m visible
&lt;br&gt;during the definition.
&lt;br&gt;&lt;br&gt;I'm sorry the poor thing isn't as good at guessing
&lt;br&gt;as it should be, but it's not so hard just to tell
&lt;br&gt;it what you want.
&lt;br&gt;&lt;br&gt;Hope this helps
&lt;br&gt;&lt;br&gt;Conor
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Transpose-again-tp15759821p15760790.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15759821</id>
	<title>Transpose again</title>
	<published>2008-02-29T06:16:45Z</published>
	<updated>2008-02-29T06:16:45Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">I decided to write transpose with implicit parameters. And get stuck, as usual.
&lt;br&gt;&lt;br&gt;This is partial code:
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( n : Nat ; &amp;nbsp;m : Nat ; &amp;nbsp;xys : Vec n (Vec m X) !
&lt;br&gt;let &amp;nbsp;!---------------------------------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp;transpose _n _m xys : Vec m (Vec n X) &amp;nbsp; &amp;nbsp;)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;transpose _ n _ m xys &amp;lt;= rec xys
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{ transpose _ n _ m xys &amp;lt;= case xys
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ transpose _ n _ zero vnil [&amp;lt;= case _n]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;transpose _ n _ (suc m) (vcons xy xys) []
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;Why &amp;quot;&amp;lt;= case xys&amp;quot; matches xys and m? The type of xys is clearly says
&lt;br&gt;that it depends on n, then on m and matching should be done on xys and
&lt;br&gt;n.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Transpose-again-tp15759821p15759821.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15723732</id>
	<title>Re: Generic programming again, now exercise 3.</title>
	<published>2008-02-27T13:15:15Z</published>
	<updated>2008-02-27T13:15:15Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">&amp;gt; I've tried not to give away to much so that you can complete the exercise
&lt;br&gt;&amp;gt; yourself, but I fear this may have caused me to be less than clear in
&lt;br&gt;&amp;gt; places. If you find you are still lost, please don't hesite to ask more
&lt;br&gt;&amp;gt; questions :)
&lt;br&gt;&lt;br&gt;I found some errors you mentioned by myself and I stopped reading with
&lt;br&gt;attention when I realized that I am on the right track (yes, wNil with
&lt;br&gt;parameter). Now it took me more than several seconds after the sending
&lt;br&gt;mail here. ;)
&lt;br&gt;&lt;br&gt;I haven't had time to verify my thoughts yet but I think I know how to
&lt;br&gt;do it right.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Generic-programming-again%2C-now-exercise-3.-tp15684589p15723732.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15717500</id>
	<title>Re: Generic programming again, now exercise 3.</title>
	<published>2008-02-27T08:33:32Z</published>
	<updated>2008-02-27T08:33:32Z</updated>
	<author>
		<name>peter morris-2</name>
	</author>
	<content type="html">Hi Serguey,&lt;br&gt;&lt;br&gt; &amp;gt; When I meditated on that exercise I come to interesting conclusion.&lt;br&gt; &amp;gt; wNat has a &amp;quot;type&amp;quot; *, and has a value from &amp;quot;universe of types&amp;quot;, W Bool&lt;br&gt; &amp;gt; So. Does it mean that when we declare wZero : wNat, wNat gets&lt;br&gt;

 &amp;gt; &amp;quot;expanded&amp;quot; and its&amp;#39; value gets substituted as the type for wZero?&lt;br&gt;&lt;br&gt;No, the definition wNat contains representatives for all Natural Numbers regardless of the definitions wZero and wSuc. The point of defining these &amp;#39;constructors&amp;#39; is simply to equip this generic encoding of Nat with the standard, Peano interface (at least when it comes to constructing natural numbers, elimination is another matter). They do not change the fact that wNat is already closed under zero and successor.&lt;br&gt;

&lt;br&gt;&amp;gt; My description of Lists follows wNat example from paper. Did I&lt;br&gt; &amp;gt; described Lists correctly?&lt;br&gt;&lt;br&gt;Given that the &amp;#39;constructors&amp;#39; wZero and &amp;#39;wSuc&amp;#39; do not &amp;quot;expand&amp;quot; the definition of wNat the definition of &amp;#39;wList&amp;#39; must be different from that of &amp;#39;wNat&amp;#39;. You should be suspicious that the element &amp;#39;a : A&amp;#39; appears nowhere on the right-hand side of your definition of &amp;#39;wCons&amp;#39;. (Also I worry that your wNil constructor also takes an element of &amp;#39;A&amp;#39;, surely the empty list contains no &amp;#39;A&amp;#39;s?). Generally the &amp;#39;S&amp;#39; in &amp;#39;W S P&amp;#39; must contain information about the type&amp;#39;s constructors *and* non-recursive arguments. You use &amp;#39;Bool&amp;#39; for &amp;#39;S&amp;#39; in the definition of &amp;#39;wNat&amp;#39; though one could define a new type with more informative constructor names:&lt;br&gt;

&lt;br&gt;data NatCons : * where nczero : NatCons ; ncsuc : NatCons&lt;br&gt;&lt;br&gt;The &amp;#39;P&amp;#39; part then defines how many recursive arguments each constructor takes, &amp;#39;Oh&amp;#39; dictates that &amp;#39;false&amp;#39; (or &amp;#39;nczero&amp;#39;) has none, and &amp;#39;true&amp;#39; (&amp;#39;ncsuc&amp;#39;) has one.&amp;nbsp; While the definition of &amp;#39;wList&amp;#39; has a similar shape to &amp;#39;wNat&amp;#39; one must account in the definition for the presence of an &amp;#39;A&amp;#39; in the constructor &amp;#39;wCons&amp;#39;.&amp;nbsp;&lt;br&gt;
&lt;br&gt;I&amp;#39;ve tried not to give away to much so that you can complete the exercise yourself, but I fear this may have caused me to be less than clear in places. If you find you are still lost, please don&amp;#39;t hesite to ask more questions :)&lt;br&gt;
&lt;br&gt;Peter&lt;br&gt;&lt;br&gt;&lt;div&gt;&lt;span class=&quot;gmail_quote&quot;&gt;On 26/02/2008, &lt;b class=&quot;gmail_sendername&quot;&gt;Serguey Zefirov&lt;/b&gt; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=15717500&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sergueyz@...&lt;/a&gt;&amp;gt; wrote:&lt;/span&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

I decided to start from something lighter than BTree. I choosed a&lt;br&gt; List. This is easy because Lists are very like Nats, just a little bit&lt;br&gt; more polymorphic.&lt;br&gt; &lt;br&gt; When I meditated on that exercise I come to interesting conclusion.&lt;br&gt;

 wNat has a &amp;quot;type&amp;quot; *, and has a value from &amp;quot;universe of types&amp;quot;, W Bool&lt;br&gt; So. Does it mean that when we declare wZero : wNat, wNat gets&lt;br&gt; &amp;quot;expanded&amp;quot; and its&amp;#39; value gets substituted as the type for wZero?&lt;br&gt;

 &lt;br&gt; My description of Lists follows wNat example from paper. Did I&lt;br&gt; described Lists correctly?&lt;br&gt; &lt;br&gt; ------------------------------------------------------------------------------&lt;br&gt; let&amp;nbsp;&amp;nbsp;(----------!&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! wNat : * )&lt;br&gt;

 &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wNat =&amp;gt; W Bool So&lt;br&gt; ------------------------------------------------------------------------------&lt;br&gt; let&amp;nbsp;&amp;nbsp;(--------------!&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! wZero : wNat )&lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wZero =&amp;gt; Sup false notSo&lt;br&gt; ------------------------------------------------------------------------------&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&amp;nbsp;&amp;nbsp; n : wNat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!&lt;br&gt; let&amp;nbsp;&amp;nbsp;!---------------!&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! wSuc n : wNat )&lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wSuc n =&amp;gt; Sup true (lam p =&amp;gt; n)&lt;br&gt; ------------------------------------------------------------------------------&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( A : * ;&amp;nbsp;&amp;nbsp;a : A !&lt;br&gt;

 let&amp;nbsp;&amp;nbsp;!----------------!&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&amp;nbsp;&amp;nbsp;wList a : *&amp;nbsp;&amp;nbsp; )&lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wList a =&amp;gt; W Bool So&lt;br&gt; ------------------------------------------------------------------------------&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a : A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; !&lt;br&gt; let&amp;nbsp;&amp;nbsp;!------------------!&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! wNil a : wList a )&lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wNil a =&amp;gt; Sup false notSo&lt;br&gt; ------------------------------------------------------------------------------&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( a : A ;&amp;nbsp;&amp;nbsp;as : wList A !&lt;br&gt; let&amp;nbsp;&amp;nbsp;!-----------------------!&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ! wCons a as : wList A&amp;nbsp;&amp;nbsp;)&lt;br&gt; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wCons a as =&amp;gt; Sup true (lam p =&amp;gt; as)&lt;br&gt; ------------------------------------------------------------------------------&lt;br&gt; &lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Generic-programming-again%2C-now-exercise-3.-tp15684589p15717500.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15687702</id>
	<title>Re: Higher-order functions.</title>
	<published>2008-02-26T02:43:13Z</published>
	<updated>2008-02-26T02:43:13Z</updated>
	<author>
		<name>James McKinna</name>
	</author>
	<content type="html">Serguey,
&lt;br&gt;&lt;br&gt;A reasonable question, to which you might receive several possible answers:
&lt;br&gt;&lt;br&gt;At the risk of duplication, or just being a bit out of date now --- the 
&lt;br&gt;previous go having failed as I needed to re-align my subscription 
&lt;br&gt;address to my new coordinates --- let me add the following observations 
&lt;br&gt;below.
&lt;br&gt;&lt;br&gt;Thanks for your continuing interest, and I hope this helps, (and perhaps 
&lt;br&gt;my other colleagues will leap in to correct or contradict me!)
&lt;br&gt;&lt;br&gt;James McKinna
&lt;br&gt;Radboud University Nijmegen
&lt;br&gt;&lt;br&gt;Serguey Zefirov wrote:
&lt;br&gt;&amp;gt; I hardly can find any example of higher-order functions in Epigram
&lt;br&gt;&amp;gt; examples. I searched distribution examples and online examples.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Why is that?
&lt;br&gt;0) on the language and its library of examples
&lt;br&gt;0a) the library, such as it is, has been focused on examples which show 
&lt;br&gt;off the use of indices in type families to constrain computation: 
&lt;br&gt;typically, these take the form of first-order data (lengths of vectors, 
&lt;br&gt;size bounds on trees, type names...) used for &amp;nbsp;measurement
&lt;br&gt;&lt;br&gt;0b) incidentally, the use of 'by' notation hides a lot of 
&lt;br&gt;behind-the-scenes dependently-typed higher-order functions... actually, 
&lt;br&gt;I don't think this is (co-)incidental at all --- see 3) below
&lt;br&gt;&lt;br&gt;1) on higher-order functions proper
&lt;br&gt;1a) standard higher-order functions such as map, fold on lists etc. are 
&lt;br&gt;all trivially available (and/but simply-typed!), so not much attention 
&lt;br&gt;has been paid to them; functions which take dependently-typed functions 
&lt;br&gt;as arguments are less common in nature or experience --- we are still 
&lt;br&gt;learning to program this way. But you could try writing the version of 
&lt;br&gt;&amp;quot;map&amp;quot; which takes a list of elements of A, a function f of type 
&lt;br&gt;(x:A)B(x) which ensures each a in A is mapped to ... something 
&lt;br&gt;satisfying property B, and returns a function mapping lists of As to 
&lt;br&gt;lists of &amp;quot;elementwise B(-)s&amp;quot;. If you were to try this example, it might 
&lt;br&gt;throw up some interesting problems: should the result type be List 
&lt;br&gt;(Sigma a:A. B[a]) or something more interesting? And then how do you 
&lt;br&gt;write the function? Choices, choices, ...
&lt;br&gt;&lt;br&gt;1b) [Wouter's suggestion also includes this example] for a non-trivial 
&lt;br&gt;example of a dt higher-order function, look at Conor's draft paper on 
&lt;br&gt;closure under substitution in syntax with binders (I can probably supply 
&lt;br&gt;a URL if you need it); we need more examples like this: in this case, 
&lt;br&gt;the proofs were done years ago (by myself and Healf Goguen), and the 
&lt;br&gt;programs re-invented in a slightly different way, only years later...
&lt;br&gt;&lt;br&gt;2) on a syntactic restriction
&lt;br&gt;Epigram 1's syntax for let declarations and their bodies discourages 
&lt;br&gt;writing functions which return functions ... e.g. Epigram 1 doesn't 
&lt;br&gt;allow terms of the form
&lt;br&gt;lam x =&amp;gt; case x { ...} for example: case x is an elimination operator, 
&lt;br&gt;so is expected to &amp;nbsp;appear in a &amp;lt;= expression. Taking functional 
&lt;br&gt;arguments is no problem, though, and they can even be declared 
&lt;br&gt;inference-rule style...
&lt;br&gt;&lt;br&gt;3) more speculatively, more abstractly
&lt;br&gt;You might wonder about higher-order functions in the special case of 
&lt;br&gt;parametric polymorphism in simply-typed languages: do they impose a 
&lt;br&gt;uniformity on their use/application (or the use of their h-o arguments) 
&lt;br&gt;which runs counter to the 'learning-by-testing' which arises in 
&lt;br&gt;dependently-typed case analysis? What are the right ways to capture new 
&lt;br&gt;kinds of such uniformities in the dependently-typed case? &amp;nbsp;Again, only 
&lt;br&gt;examples and experience will tell us. Here &amp;nbsp;example 1b above is a good 
&lt;br&gt;such candidate (sorry for the pun): h-o functions which carry around 
&lt;br&gt;functional arguments representing abstract closure conditions on the 
&lt;br&gt;intended source and target data. Elimination operators (0b above) are 
&lt;br&gt;just one very &amp;nbsp;general vision of that idea: for 'methods' in elimination 
&lt;br&gt;operators are just 'abstract closure conditions which correspond 
&lt;br&gt;to/arise from patterns of data' (typically, but not necessarily, given 
&lt;br&gt;by constructor patterns).
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Higher-order-functions.-tp15482433p15687702.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15684589</id>
	<title>Generic programming again, now exercise 3.</title>
	<published>2008-02-25T22:39:12Z</published>
	<updated>2008-02-25T22:39:12Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">I decided to start from something lighter than BTree. I choosed a
&lt;br&gt;List. This is easy because Lists are very like Nats, just a little bit
&lt;br&gt;more polymorphic.
&lt;br&gt;&lt;br&gt;When I meditated on that exercise I come to interesting conclusion.
&lt;br&gt;wNat has a &amp;quot;type&amp;quot; *, and has a value from &amp;quot;universe of types&amp;quot;, W Bool
&lt;br&gt;So. Does it mean that when we declare wZero : wNat, wNat gets
&lt;br&gt;&amp;quot;expanded&amp;quot; and its' value gets substituted as the type for wZero?
&lt;br&gt;&lt;br&gt;My description of Lists follows wNat example from paper. Did I
&lt;br&gt;described Lists correctly?
&lt;br&gt;&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;let &amp;nbsp;(----------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wNat : * )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wNat =&amp;gt; W Bool So
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;let &amp;nbsp;(--------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wZero : wNat )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wZero =&amp;gt; Sup false notSo
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; n : wNat &amp;nbsp; &amp;nbsp;!
&lt;br&gt;let &amp;nbsp;!---------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wSuc n : wNat )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wSuc n =&amp;gt; Sup true (lam p =&amp;gt; n)
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( A : * ; &amp;nbsp;a : A !
&lt;br&gt;let &amp;nbsp;!----------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp;wList a : * &amp;nbsp; )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wList a =&amp;gt; W Bool So
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; &amp;nbsp; &amp;nbsp;a : A &amp;nbsp; &amp;nbsp; &amp;nbsp; !
&lt;br&gt;let &amp;nbsp;!------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wNil a : wList a )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wNil a =&amp;gt; Sup false notSo
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( a : A ; &amp;nbsp;as : wList A !
&lt;br&gt;let &amp;nbsp;!-----------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! wCons a as : wList A &amp;nbsp;)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;wCons a as =&amp;gt; Sup true (lam p =&amp;gt; as)
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Generic-programming-again%2C-now-exercise-3.-tp15684589p15684589.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15669746</id>
	<title>Re: transpose from Generic Programming with Dependent Types.</title>
	<published>2008-02-25T06:30:47Z</published>
	<updated>2008-02-25T06:30:47Z</updated>
	<author>
		<name>Conor McBride-2</name>
	</author>
	<content type="html">Hi
&lt;br&gt;&lt;br&gt;On 22 Feb 2008, at 12:52, Serguey Zefirov wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; 0xN is an empty list
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;Nx0, the result of the transposition, is a list of N empty &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; lists. &amp;nbsp;You
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;can express this (the value of N...) with vectors/dependent- 
&lt;br&gt;&amp;gt;&amp;gt; types, you
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;know how long it should be, so you can do this.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;does that seem right?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Yes, but I don't know how to find N it through Epigram. I cannot do
&lt;br&gt;&amp;gt; case analysis on the length of Vec.
&lt;/div&gt;&lt;br&gt;It sometimes happens that an argument which is typically
&lt;br&gt;inferrable when a function is used (hence implicit by default)
&lt;br&gt;is important and needs to be seen when defining the function.
&lt;br&gt;Fortunately, Epigram has a way to deal with this situation.
&lt;br&gt;I'm sure we could do better, but it works.
&lt;br&gt;&lt;br&gt;The standard example is the function vec, which makes a vector
&lt;br&gt;of copies of a given element. Typically, the desired length is
&lt;br&gt;known when you use the function, so you probably want it to
&lt;br&gt;be left implicit, but the vec will be defined by recursion on
&lt;br&gt;the length. Here's how to start
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( &amp;nbsp;n ; &amp;nbsp;X ; &amp;nbsp;x : X &amp;nbsp; !
&lt;br&gt;&amp;nbsp; &amp;nbsp;let &amp;nbsp;!--------------------! ; &amp;nbsp;vec _ n x []
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ! vec _n x : Vec n X )
&lt;br&gt;&lt;br&gt;The underscore character is the &amp;quot;manual override&amp;quot; for implicit
&lt;br&gt;syntax. If you use it to show n in the declaration, you will
&lt;br&gt;also be shown n in the patterns of your program. When you use
&lt;br&gt;this mechanism, it's a good idea to declare the order of
&lt;br&gt;arguments to prevent the machine from making bad choices,
&lt;br&gt;hence the &amp;quot;n ; &amp;nbsp;X ;&amp;quot; premises.
&lt;br&gt;&lt;br&gt;Hope this helps
&lt;br&gt;&lt;br&gt;Conor
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/transpose-from-Generic-Programming-with-Dependent-Types.-tp15615358p15669746.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15633672</id>
	<title>Re: transpose from Generic Programming with Dependent Types.</title>
	<published>2008-02-22T04:52:56Z</published>
	<updated>2008-02-22T04:52:56Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">&amp;gt; 0xN is an empty list
&lt;br&gt;&amp;gt; &amp;nbsp;Nx0, the result of the transposition, is a list of N empty lists. &amp;nbsp;You
&lt;br&gt;&amp;gt; &amp;nbsp;can express this (the value of N...) with vectors/dependent-types, you
&lt;br&gt;&amp;gt; &amp;nbsp;know how long it should be, so you can do this.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;does that seem right?
&lt;br&gt;&lt;br&gt;Yes, but I don't know how to find N it through Epigram. I cannot do
&lt;br&gt;case analysis on the length of Vec.
&lt;br&gt;&lt;br&gt;I decided to solve that troubling case alone, make transformation from
&lt;br&gt;(Vec zero (Vec n X)) to (Vec n (Vec zero X)). I stumbled at the same
&lt;br&gt;problem - how to extract length n of (Vec n X) from vnil of (Vec zero
&lt;br&gt;(Vec n X)).
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/transpose-from-Generic-Programming-with-Dependent-Types.-tp15615358p15633672.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15619524</id>
	<title>Re: transpose from Generic Programming with Dependent Types.</title>
	<published>2008-02-21T11:11:44Z</published>
	<updated>2008-02-21T11:11:44Z</updated>
	<author>
		<name>Isaac Dupree</name>
	</author>
	<content type="html">Serguey Zefirov wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; let (xys : Vec m (Vec n X) ---- transpose xys: Vec n (Vec m X))
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Why isn't it possible to use Haskell version of transpose as a boilerplate?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; transpose [] = []
&lt;br&gt;&amp;gt; transpose ([] : xys) = transpose xys
&lt;br&gt;&amp;gt; transpose ((x:xs):xys) = ...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; BTW, when I elaborating cases in Epigram, the first case of transpose
&lt;br&gt;&amp;gt; xys is a vnil (after rec xys then case xys). And, actually, it makes
&lt;br&gt;&amp;gt; sense to return vnil as an aswer. But Epigram colours return of vnil
&lt;br&gt;&amp;gt; in brown.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;From elaboration information in Epigram buffer I figured out that
&lt;br&gt;&amp;gt; first vnil case is a transposition to (Vec m (Vec zero X)) and tried
&lt;br&gt;&amp;gt; recursion on m. It gave me two cases for vnil. First vnil (Vec zero
&lt;br&gt;&amp;gt; (Vec zero X)) can be transposed into vnil. But second vnil (for result
&lt;br&gt;&amp;gt; type Vec (suc m) (Vec zero X)) couldn't elaborate preperly.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Now I am lost for a little bit longer than in previous questions.
&lt;/div&gt;&lt;br&gt;0xN is an empty list
&lt;br&gt;Nx0, the result of the transposition, is a list of N empty lists. &amp;nbsp;You 
&lt;br&gt;can express this (the value of N...) with vectors/dependent-types, you 
&lt;br&gt;know how long it should be, so you can do this.
&lt;br&gt;&lt;br&gt;does that seem right?
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/transpose-from-Generic-Programming-with-Dependent-Types.-tp15615358p15619524.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15615358</id>
	<title>transpose from Generic Programming with Dependent Types.</title>
	<published>2008-02-21T08:16:24Z</published>
	<updated>2008-02-21T08:16:24Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">let (xys : Vec m (Vec n X) ---- transpose xys: Vec n (Vec m X))
&lt;br&gt;&lt;br&gt;Why isn't it possible to use Haskell version of transpose as a boilerplate?
&lt;br&gt;&lt;br&gt;transpose [] = []
&lt;br&gt;transpose ([] : xys) = transpose xys
&lt;br&gt;transpose ((x:xs):xys) = ...
&lt;br&gt;&lt;br&gt;BTW, when I elaborating cases in Epigram, the first case of transpose
&lt;br&gt;xys is a vnil (after rec xys then case xys). And, actually, it makes
&lt;br&gt;sense to return vnil as an aswer. But Epigram colours return of vnil
&lt;br&gt;in brown.
&lt;br&gt;&lt;br&gt;From elaboration information in Epigram buffer I figured out that
&lt;br&gt;first vnil case is a transposition to (Vec m (Vec zero X)) and tried
&lt;br&gt;recursion on m. It gave me two cases for vnil. First vnil (Vec zero
&lt;br&gt;(Vec zero X)) can be transposed into vnil. But second vnil (for result
&lt;br&gt;type Vec (suc m) (Vec zero X)) couldn't elaborate preperly.
&lt;br&gt;&lt;br&gt;Now I am lost for a little bit longer than in previous questions.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/transpose-from-Generic-Programming-with-Dependent-Types.-tp15615358p15615358.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15600841</id>
	<title>Re: How to define init for vectors?</title>
	<published>2008-02-20T14:36:35Z</published>
	<updated>2008-02-20T14:36:35Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">&amp;gt; It's not known that the length of ns is a succ, so it isn't
&lt;br&gt;&amp;gt; &amp;nbsp;appropriate to
&lt;br&gt;&amp;gt; &amp;nbsp;call vecInit here. &amp;nbsp;The Haskell function is exploiting fall-through
&lt;br&gt;&amp;gt; &amp;nbsp;in patterns
&lt;br&gt;&amp;gt; &amp;nbsp;here, so you should expect the Epigram version to be slightly
&lt;br&gt;&amp;gt; &amp;nbsp;noisier. So far,
&lt;br&gt;&amp;gt; &amp;nbsp;you haven't quite determined which case you're in. You will need to
&lt;br&gt;&amp;gt; &amp;nbsp;look a
&lt;br&gt;&amp;gt; &amp;nbsp;bit harder. You'll also need to indicate what you're doing recursion on.
&lt;br&gt;&lt;br&gt;Yes. I almost used to arriving to the answer the seconds after asking
&lt;br&gt;a question.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( X : * ; xs : Vec (succ n) X !
&lt;br&gt;let !------------------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! vecInit xs : Vec n X )
&lt;br&gt;&lt;br&gt;vecInit xs &amp;lt;= case xs
&lt;br&gt;&amp;nbsp; { vecInit (vcons n' ns) &amp;lt;= case ns
&lt;br&gt;&amp;nbsp; &amp;nbsp; { vecInit (vcons n' vnil) =&amp;gt; vnil
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; vecInit (vcons n'' (vcons n' ns)) =&amp;gt; vcons n'' (vecInit (vcons n' ns))
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&lt;br&gt;(indentation can be broken, I indented badly pasted version)
&lt;br&gt;&lt;br&gt;I'm looking for more dependent function. Now - with variable length
&lt;br&gt;vector size checking!
&lt;br&gt;&lt;br&gt;(I almost figured out how to do it)
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/How-to-define-init-for-vectors--tp15589825p15600841.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15593505</id>
	<title>Re: How to define init for vectors?</title>
	<published>2008-02-20T08:46:52Z</published>
	<updated>2008-02-20T08:46:52Z</updated>
	<author>
		<name>Conor McBride-2</name>
	</author>
	<content type="html">Hi Serguey
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; And here I got stuck:
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------- 
&lt;br&gt;&amp;gt; --------
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;( X : * ; &amp;nbsp;xs : Vec (succ n) X !
&lt;br&gt;&amp;gt; let &amp;nbsp;!------------------------------!
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; vecInit xs : Vec n X &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;vecInit xs &amp;lt;= case xs
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ vecInit (vcons n' ns) =&amp;gt; vcons n' (vecInit ns)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------- 
&lt;br&gt;&amp;gt; --------
&lt;br&gt;&amp;gt; This is a version of init function from Haskell Prelude:
&lt;br&gt;&amp;gt; init [x] = []
&lt;br&gt;&amp;gt; init (x:xs) = x:init xs
&lt;br&gt;&amp;gt; I do not get second case from Epigram when elaborating. And, actually,
&lt;br&gt;&amp;gt; Epigram does not like &amp;quot;=&amp;gt; vcons n' (vecInit ns)&amp;quot; part. But I can
&lt;br&gt;&amp;gt; understand that, albeit not formally.
&lt;/div&gt;&lt;br&gt;It's not known that the length of ns is a succ, so it isn't &amp;nbsp;
&lt;br&gt;appropriate to
&lt;br&gt;call vecInit here. &amp;nbsp;The Haskell function is exploiting fall-through &amp;nbsp;
&lt;br&gt;in patterns
&lt;br&gt;here, so you should expect the Epigram version to be slightly &amp;nbsp;
&lt;br&gt;noisier. So far,
&lt;br&gt;you haven't quite determined which case you're in. You will need to &amp;nbsp;
&lt;br&gt;look a
&lt;br&gt;bit harder. You'll also need to indicate what you're doing recursion on.
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Where should I look for hints on to get a clue on how to do it right?
&lt;br&gt;&lt;br&gt;The tail of the list!
&lt;br&gt;&lt;br&gt;All the best
&lt;br&gt;&lt;br&gt;Conor
&lt;br&gt;&lt;br&gt;&lt;br&gt;This message has been checked for viruses but the contents of an attachment
&lt;br&gt;may still contain software viruses, which could damage your computer system:
&lt;br&gt;you are advised to perform your own checks. Email communications with the
&lt;br&gt;University of Nottingham may be monitored as permitted by UK legislation.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/How-to-define-init-for-vectors--tp15589825p15593505.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15589825</id>
	<title>How to define init for vectors?</title>
	<published>2008-02-20T06:01:14Z</published>
	<updated>2008-02-20T06:01:14Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">I try to write small familiar programs to understand dependent types
&lt;br&gt;programming better (more precisely, understand it at all). All usual
&lt;br&gt;maps and folds are done and I processed to more dependent ones.
&lt;br&gt;&lt;br&gt;That's what I managed to write:
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( &amp;nbsp; n : Nat &amp;nbsp; &amp;nbsp;!
&lt;br&gt;data (---------! &amp;nbsp;where (------------! ; &amp;nbsp;!--------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! Nat : * ) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! zero : Nat ) &amp;nbsp; &amp;nbsp;! succ n : Nat )
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; &amp;nbsp;A : * &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( &amp;nbsp; &amp;nbsp; &amp;nbsp;a : A &amp;nbsp; &amp;nbsp; &amp;nbsp; !
&lt;br&gt;data !-------------! &amp;nbsp;where (-------------------! ; &amp;nbsp;!------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! Maybe A : * ) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! Nothing : Maybe A ) &amp;nbsp; &amp;nbsp;! Just a : Maybe A )
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( A : * ; &amp;nbsp;B : * ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( &amp;nbsp; &amp;nbsp;a : A ; &amp;nbsp;b : B &amp;nbsp; &amp;nbsp;!
&lt;br&gt;data !----------------! &amp;nbsp;where !----------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp;Pair A B : * &amp;nbsp;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! Tuple a b : Pair A B )
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( n : Nat ; &amp;nbsp;X : * ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( x : X ; &amp;nbsp;xs : Vec n X !
&lt;br&gt;data !------------------! &amp;nbsp;where (--------------! ; &amp;nbsp;!-----------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; Vec n X : * &amp;nbsp; &amp;nbsp;) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! vnil : &amp;nbsp; &amp;nbsp; &amp;nbsp; ! &amp;nbsp; &amp;nbsp;! &amp;nbsp; vcons x xs : &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; Vec zero X ) &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; Vec (succ n) X &amp;nbsp; &amp;nbsp;)
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;let &amp;nbsp;(-------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! width : Nat )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;width =&amp;gt; succ (succ zero)
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;And here I got stuck:
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;( X : * ; &amp;nbsp;xs : Vec (succ n) X !
&lt;br&gt;let &amp;nbsp;!------------------------------!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;! &amp;nbsp; &amp;nbsp; vecInit xs : Vec n X &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;vecInit xs &amp;lt;= case xs
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ vecInit (vcons n' ns) =&amp;gt; vcons n' (vecInit ns)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;------------------------------------------------------------------------------
&lt;br&gt;This is a version of init function from Haskell Prelude:
&lt;br&gt;init [x] = []
&lt;br&gt;init (x:xs) = x:init xs
&lt;br&gt;I do not get second case from Epigram when elaborating. And, actually,
&lt;br&gt;Epigram does not like &amp;quot;=&amp;gt; vcons n' (vecInit ns)&amp;quot; part. But I can
&lt;br&gt;understand that, albeit not formally.
&lt;br&gt;&lt;br&gt;Where should I look for hints on to get a clue on how to do it right?
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/How-to-define-init-for-vectors--tp15589825p15589825.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15485843</id>
	<title>Re: Higher-order functions.</title>
	<published>2008-02-14T09:59:38Z</published>
	<updated>2008-02-14T09:59:38Z</updated>
	<author>
		<name>Wouter Swierstra</name>
	</author>
	<content type="html">Hi Serguey,
&lt;br&gt;&lt;br&gt;&amp;gt; I hardly can find any example of higher-order functions in Epigram
&lt;br&gt;&amp;gt; examples. I searched distribution examples and online examples.
&lt;br&gt;&lt;br&gt;There are a few higher-order functions in Conor's lecture notes:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.e-pig.org/downloads/epigram-notes.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.e-pig.org/downloads/epigram-notes.pdf&lt;/a&gt;&lt;br&gt;&lt;br&gt;See Section 3.4 or the exercises of Section 4.1 for examples.
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Wouter
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Higher-order-functions.-tp15482433p15485843.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15482433</id>
	<title>Higher-order functions.</title>
	<published>2008-02-14T07:08:19Z</published>
	<updated>2008-02-14T07:08:19Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">I hardly can find any example of higher-order functions in Epigram
&lt;br&gt;examples. I searched distribution examples and online examples.
&lt;br&gt;&lt;br&gt;Why is that?
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Higher-order-functions.-tp15482433p15482433.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15458623</id>
	<title>Constant definition.</title>
	<published>2008-02-13T05:34:11Z</published>
	<updated>2008-02-13T05:34:11Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">Sorry, I figured it second later I hit &amp;quot;Send&amp;quot; button.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Constant-definition.-tp15458623p15458623.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-15458600</id>
	<title>How to define a constant in Epigram?</title>
	<published>2008-02-13T05:32:11Z</published>
	<updated>2008-02-13T05:32:11Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">I need a &amp;quot;width,&amp;quot; a length of vector to transfer between two
&lt;br&gt;functions. I managed to define a list with upper bound on its' length
&lt;br&gt;(ListLE n X) and I'd like to create a function that collect data in
&lt;br&gt;ListLE and answers Just (Vec n X) when it collected ListLE (width) X
&lt;br&gt;(and Nothing otherwise).
&lt;br&gt;&lt;br&gt;I cannot figure how to define it width.
&lt;br&gt;&lt;br&gt;[let (----width : Nat)] elaborates to seemingly proper structure, but
&lt;br&gt;then I fail to figure out how to provide value for width. width [&amp;lt;=
&lt;br&gt;succ (succ zero)] elaborates to brown expression, telling me I'm
&lt;br&gt;wrong.
&lt;br&gt;&lt;br&gt;But I don't see how and where I am wrong.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/How-to-define-a-constant-in-Epigram--tp15458600p15458600.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14214058</id>
	<title>Re: Got stuck.</title>
	<published>2007-12-07T06:52:18Z</published>
	<updated>2007-12-07T06:52:18Z</updated>
	<author>
		<name>Wouter Swierstra</name>
	</author>
	<content type="html">Hi Serguey,
&lt;br&gt;&lt;br&gt;I'm afraid there's no easy way we can help - both the problems you &amp;nbsp;
&lt;br&gt;mention are known limitations of programming with Epigram 1.
&lt;br&gt;&lt;br&gt;Yes - you can only undo the last change you made. There's no way to &amp;nbsp;
&lt;br&gt;edit code once you've hit escape. The only thing to do is copy the &amp;nbsp;
&lt;br&gt;entire buffer to *scratch*, make the changes you want, reset the &amp;nbsp;
&lt;br&gt;Epigram buffer, and try again. The same trick works if you want to &amp;nbsp;
&lt;br&gt;add a data constructor (although you may need to rewrite all the &amp;nbsp;
&lt;br&gt;functions you wrote using this data type as there is now a new &amp;nbsp;
&lt;br&gt;constructor).
&lt;br&gt;&lt;br&gt;If you want to do any serious development using Epigram, you may want &amp;nbsp;
&lt;br&gt;to look at Agda 2 (&lt;a href=&quot;http://appserv.cs.chalmers.se/users/ulfn/wiki/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://appserv.cs.chalmers.se/users/ulfn/wiki/&lt;/a&gt;&amp;nbsp;
&lt;br&gt;agda.php) instead - it's a lot more stable and better supported than &amp;nbsp;
&lt;br&gt;Epigram 1 is at the moment. A lot of our effort is focussed on &amp;nbsp;
&lt;br&gt;developing a new version of Epigram, instead of maintaining the old one.
&lt;br&gt;&lt;br&gt;Hope this helps,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;Wouter
&lt;br&gt;&lt;br&gt;This message has been checked for viruses but the contents of an attachment
&lt;br&gt;may still contain software viruses, which could damage your computer system:
&lt;br&gt;you are advised to perform your own checks. Email communications with the
&lt;br&gt;University of Nottingham may be monitored as permitted by UK legislation.
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Got-stuck.-tp14213477p14214058.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-14213477</id>
	<title>Got stuck.</title>
	<published>2007-12-07T06:17:52Z</published>
	<updated>2007-12-07T06:17:52Z</updated>
	<author>
		<name>Serguey Zefirov</name>
	</author>
	<content type="html">There are two places where I do get stuck:
&lt;br&gt;1) I cannot edit any existing definitions except the very last one (by
&lt;br&gt;using Undo)
&lt;br&gt;2) When defining data I successfully manage to elaborate first data
&lt;br&gt;constructor and then got stuck again. There is no (visible) way to
&lt;br&gt;insert semicolon and elaborate remaining data constructors.
&lt;br&gt;&lt;br&gt;I use Epigram with XEmacs 21.4.21 under Windows.
&lt;br&gt;&lt;br&gt;Thank you in advance.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Got-stuck.-tp14213477p14213477.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12114265</id>
	<title>reactions to &quot;Simply Easy&quot; paper</title>
	<published>2007-08-12T07:22:19Z</published>
	<updated>2007-08-12T07:22:19Z</updated>
	<author>
		<name>Isaac Dupree</name>
	</author>
	<content type="html">Assorted reactions I had while reading &amp;quot;Simply Easy! An Implementation 
&lt;br&gt;of a Dependently Typed Lambda Calculus&amp;quot; paper. (I wonder where to send 
&lt;br&gt;this message).
&lt;br&gt;&lt;br&gt;pi replaces Fun (type of function), lam stays lam (value of function). 
&lt;br&gt;It took me a while to figure out that that was what was going on... it 
&lt;br&gt;was not stated explicitly, and the relative appearances of the three 
&lt;br&gt;things (forall, fun and lam) did not at all clarify things (neither the 
&lt;br&gt;mathematical symbol forms, nor what the implementation called them). &amp;nbsp;It 
&lt;br&gt;would be simpler though more tedious to merge values and types first (it 
&lt;br&gt;was said to simplify some aspects of the code after all), without 
&lt;br&gt;changing fun to pi
&lt;br&gt;&lt;br&gt;(aka becoming dependent - it's just one in which the range, instead of 
&lt;br&gt;sitting there on the right of the arrow, may [depend on / vary with] the 
&lt;br&gt;value applied to the lam being typed -- you cannot know a concrete type 
&lt;br&gt;of the result (the range) until you know the concrete type and then the 
&lt;br&gt;concrete value of the argument. &amp;nbsp;Just like allowing parametric 
&lt;br&gt;polymorphism in Haskell: (id :: a -&amp;gt; a), meaning that you can only know 
&lt;br&gt;that the result is Bool once you know that the argument is of type bool. 
&lt;br&gt;The only difference with dependent types being, you also may have to 
&lt;br&gt;know whether the argument is True or False (which is equally well 
&lt;br&gt;unknown to a seperate-compilation compiler, in most cases, as the 
&lt;br&gt;argument's concrete type is). &amp;nbsp;Combined with unifying types and values, 
&lt;br&gt;this means polymorphism is easy (with some explicitness... extra lams to 
&lt;br&gt;capture the types that may vary, even if they are not used to compute 
&lt;br&gt;the value of the result). &amp;nbsp;I then wonder how this type system is used 
&lt;br&gt;like rank-2 and weirder... ok.
&lt;br&gt;haskell: runST :: forall a. (forall s. ST s a) -&amp;gt; a
&lt;br&gt;lp:
&lt;br&gt;&amp;nbsp; runST :: forall a::*. (forall s::*. ST s a) -&amp;gt; a
&lt;br&gt;or
&lt;br&gt;&amp;nbsp; runST :: forall a::*. forall x::(forall s::*. ST s a). a
&lt;br&gt;easy!!!! the &amp;quot;-&amp;gt;&amp;quot; in the type is nothing to do with lam, merely
&lt;br&gt;equivalent to fun, just a syntax sugar that's immediately turned into
&lt;br&gt;forall(pi). &amp;nbsp;The rank-2 argument, in lp, takes an 's' argument that it 
&lt;br&gt;needs to use to create any internal ST parts according to their 's' 
&lt;br&gt;arguments. &amp;nbsp;runST invents one, and e.g. newSTRef or readSTRef consumes 
&lt;br&gt;one, as they are primitives (unless there is another sound way to 
&lt;br&gt;implement them).
&lt;br&gt;&amp;nbsp; and we all know typeclasses are really weird and troublesome sugar...
&lt;br&gt;and the dictionary approach is &amp;quot;easy&amp;quot; to do explicitly here..?
&lt;br&gt;&lt;br&gt;natElim's type explains much more to me what it does than foldNat's type
&lt;br&gt;does!
&lt;br&gt;&lt;br&gt;I would have preferred figures 15 and 16 to have bluish backgrounds, as
&lt;br&gt;they are added stuff and they don't stand on their own (but... are
&lt;br&gt;unnecessary to fundamental dependent types... but some of the other
&lt;br&gt;Nat-stuff _is_ blue)
&lt;br&gt;&lt;br&gt;Where is the .lhs source of the paper itself, to see how it was done?
&lt;br&gt;&lt;br&gt;Probably the &amp;quot;uniplate&amp;quot; library could simplify it somewhat for those who 
&lt;br&gt;know uniplate already.
&lt;br&gt;&lt;br&gt;&lt;br&gt;It is quite right about (type) inference - it seems some of the most 
&lt;br&gt;important research for dependently typed languages is actually being 
&lt;br&gt;done by GHC, in implementing type inferences that have to be predictable 
&lt;br&gt;and powerful (and work with a fairly sophisticated type system...). &amp;nbsp;It 
&lt;br&gt;is the reason that I can't easily write a dynamically-typed Haskell 
&lt;br&gt;interpreter that doesn't do type inference - class instance selection is 
&lt;br&gt;quite hard, especially in the presence of defaulting, `seq`, complicated 
&lt;br&gt;type-restricting signatures, and 
&lt;br&gt;functional-dependencies/associated-types. &amp;nbsp;(I thought it might be 
&lt;br&gt;interesting to have a way to try to produce _examples_ of 
&lt;br&gt;type-incorrectness for when a type error message is incomprehensible. 
&lt;br&gt;Of course some programs are NOT dynamically type-incorrect and it 
&lt;br&gt;wouldn't be able to find an example in those, and it might be unsafe in 
&lt;br&gt;other ways like if it can't enforce runST's rank-2 type signature when 
&lt;br&gt;the result is demanded)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Isaac
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/reactions-to-%22Simply-Easy%22-paper-tp12114265p12114265.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-12092883</id>
	<title>Make the most of Now</title>
	<published>2007-08-10T08:51:56Z</published>
	<updated>2007-08-10T08:51:56Z</updated>
	<author>
		<name>Sebastian Hanowski</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&amp;nbsp;Apologies to the people &amp;nbsp;who are only in here to &amp;nbsp;catch epigram code in
&lt;br&gt;their inbox.
&lt;br&gt;But the partial monad ist discussed &amp;nbsp;as a device for structuring partial
&lt;br&gt;programming in epigram.
&lt;br&gt;And since I wrote these programs mainly to &amp;nbsp;get a grip on - a very short
&lt;br&gt;prefix of - the discussion Bas Spitters &amp;nbsp;and Thorsten had on this list a
&lt;br&gt;while ago, I drop them here.
&lt;br&gt;&lt;br&gt;&amp;gt; {-# OPTIONS -fglasgow-exts #-}
&lt;br&gt;&lt;br&gt;General recursion &amp;nbsp;augments every data &amp;nbsp;type with an extra &amp;nbsp;element, the
&lt;br&gt;divergent compution.
&lt;br&gt;&lt;br&gt;&amp;gt;-- data Empty ; bot = bot :: Empty
&lt;br&gt;&lt;br&gt;Thorsten &amp;nbsp;and &amp;nbsp;others &amp;nbsp;have &amp;nbsp;suggested &amp;nbsp;to make &amp;nbsp;this &amp;nbsp;manifest &amp;nbsp;in &amp;nbsp;the
&lt;br&gt;signature of a program, capturing partiality with the delay monad
&lt;br&gt;&lt;br&gt;&amp;gt; data{- codata -} &amp;nbsp;D a = Now a | Later (D a) ; never = Later never
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; instance Monad D where
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= Now
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Now a &amp;nbsp; &amp;gt;&amp;gt;= f = f a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Later d &amp;gt;&amp;gt;= f = Later (d &amp;gt;&amp;gt;= f)
&lt;br&gt;&lt;br&gt;which allows for a notion of a 'race'
&lt;br&gt;&lt;br&gt;&amp;gt; (%) :: D a -&amp;gt; D a -&amp;gt; D a
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&amp;gt; Now a &amp;nbsp; &amp;nbsp; % _ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = Now a
&lt;br&gt;&amp;gt; _ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; % Now a &amp;nbsp; &amp;nbsp; = Now a
&lt;br&gt;&amp;gt; Later d &amp;nbsp; % Later e &amp;nbsp; = Later (d % e)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;('synchronisation' is also at hand)
&lt;br&gt;&lt;br&gt;&amp;gt; (&amp;) :: D a -&amp;gt; D a -&amp;gt; D a
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; Now a &amp;nbsp; &amp;nbsp; &amp; Now _ &amp;nbsp; &amp;nbsp; = Now a
&lt;br&gt;&amp;gt; a@(Now _) &amp; Later d &amp;nbsp; = Later (a &amp; d)
&lt;br&gt;&amp;gt; Later d &amp;nbsp; &amp; a@(Now _) = Later (d &amp; a)
&lt;br&gt;&amp;gt; Later d &amp;nbsp; &amp; Later e &amp;nbsp; = Later (d &amp; e)
&lt;br&gt;&lt;br&gt;The delay &amp;nbsp;monad explains for example &amp;nbsp;why the /trivial/ fixed &amp;nbsp;point of
&lt;br&gt;monadic computations isn't very useful.
&lt;br&gt;&lt;br&gt;&amp;gt;-- class Monad m =&amp;gt; MonadFix m where
&lt;br&gt;&amp;gt;-- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mfix :: (a -&amp;gt; m a) -&amp;gt; m a
&lt;br&gt;&lt;br&gt;&amp;gt;-- instance MonadFix D where
&lt;br&gt;&amp;gt;-- &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mfix f = f =&amp;lt;&amp;lt; (mfix f)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Because taking
&lt;br&gt;&lt;br&gt;&amp;gt; bot = never
&lt;br&gt;&lt;br&gt;this mfix computes &amp;nbsp;the /least fixed point/ of a &amp;nbsp;partial program lifted
&lt;br&gt;to a partial domain. Which clearly is bot.
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;Topologists with a heart for computability theory are fond of this datatype
&lt;br&gt;&lt;br&gt;&amp;gt;-- data S = T ; bot = bot :: S
&lt;br&gt;&lt;br&gt;which allows the type of /definable characteristic functions/ of subsets
&lt;br&gt;to be defined as this
&lt;br&gt;&lt;br&gt;&amp;gt;-- type Open a = a -&amp;gt; S
&lt;br&gt;&lt;br&gt;and things start to get interesting with programs of type Open S.
&lt;br&gt;&lt;br&gt;But to be able to define the union of subsets
&lt;br&gt;&lt;br&gt;&amp;gt;-- u `union` v = \x -&amp;gt; u x `or` v x
&lt;br&gt;&lt;br&gt;one needs the following equations to hold.
&lt;br&gt;&lt;br&gt;&amp;gt;-- T &amp;nbsp; `or` T &amp;nbsp; = T
&lt;br&gt;&amp;gt;-- T &amp;nbsp; `or` bot = T
&lt;br&gt;&amp;gt;-- bot `or` T &amp;nbsp; = T
&lt;br&gt;&amp;gt;-- bot `or` bot = bot
&lt;br&gt;&lt;br&gt;Enter the delay monad...
&lt;br&gt;&lt;br&gt;Quotienting with respect to termination
&lt;br&gt;&lt;br&gt;&amp;gt; top = {- Later $ ... Later $ -} Now never
&lt;br&gt;&lt;br&gt;makes &amp;nbsp;at &amp;nbsp;least &amp;nbsp;the &amp;nbsp;important &amp;nbsp;ones from &amp;nbsp;the &amp;nbsp;above &amp;nbsp;equations &amp;nbsp;hold
&lt;br&gt;/definitionally/.
&lt;br&gt;&lt;br&gt;&amp;gt;-- top % bot ~~&amp;gt; top
&lt;br&gt;&amp;gt;-- bot % top ~~&amp;gt; top
&lt;br&gt;&lt;br&gt;And we can head for a 'subobject classifier'.
&lt;br&gt;&lt;br&gt;&amp;gt; data Zero &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {- -}
&lt;br&gt;&amp;gt; type One = D Zero &amp;nbsp; &amp;nbsp; &amp;nbsp; {- bot -}
&lt;br&gt;&amp;gt; type Omega = D One &amp;nbsp; &amp;nbsp; &amp;nbsp;{- bot,top -} ; top :: Omega
&lt;br&gt;&lt;br&gt;Now, before you go &amp;quot;Boring!&amp;quot; just because of this
&lt;br&gt;&lt;br&gt;&amp;gt; type Sub a = a -&amp;gt; Omega
&lt;br&gt;&lt;br&gt;&amp;gt; empty :: Sub a &amp;nbsp; 
&lt;br&gt;&amp;gt; empty = const bot
&lt;br&gt;&lt;br&gt;&amp;gt; whole :: Sub a
&lt;br&gt;&amp;gt; whole = const top
&lt;br&gt;&lt;br&gt;consider again the topology of the Sierpinski space.
&lt;br&gt;&lt;br&gt;&amp;gt; [{- -}_,{-top-}_,{-bot,top-}_] = [empty,id,whole] :: [Sub Omega]
&lt;br&gt;&lt;br&gt;Why is {-bot-} :: Sub Omega &amp;nbsp;missing?
&lt;br&gt;&lt;br&gt;Union and intersection are now definable
&lt;br&gt;&lt;br&gt;&amp;gt; (\/),(/\) :: Sub a -&amp;gt; Sub a -&amp;gt; Sub a
&lt;br&gt;&lt;br&gt;&amp;gt; u \/ v = \a -&amp;gt; u a % v a
&lt;br&gt;&amp;gt; u /\ v = \a -&amp;gt; u a &amp; v a
&lt;br&gt;&lt;br&gt;and readily extend to the countable and finite cases respectively.
&lt;br&gt;&lt;br&gt;&amp;gt; (\/.), (/\.) :: [Sub a] -&amp;gt; Sub a
&lt;br&gt;&lt;br&gt;&amp;gt; (\/.) = foldr (\u v -&amp;gt; u \/ (Later . v)) empty
&lt;br&gt;&lt;br&gt;&amp;gt; (/\.) = foldr (/\) whole
&lt;br&gt;&lt;br&gt;Please note that
&lt;br&gt;&lt;br&gt;&amp;gt; locale :: Sub a -&amp;gt; [Sub a] -&amp;gt; Sub a
&lt;br&gt;&amp;gt; locale = &amp;nbsp;\ &amp;nbsp; u -&amp;gt; \us &amp;nbsp; &amp;nbsp; -&amp;gt; u /\ (us \/.)
&lt;br&gt;&lt;br&gt;is well defined even if us is /countable/.
&lt;br&gt;&lt;br&gt;And we can have a poor man's roll your own TT:
&lt;br&gt;&lt;br&gt;&amp;gt; subzero :: Zero -&amp;gt; a
&lt;br&gt;&amp;gt; subzero = \_ &amp;nbsp; &amp;nbsp;-&amp;gt; error ['0'..]
&lt;br&gt;&lt;br&gt;&amp;gt;-- (%),(&amp;) :: Omega -&amp;gt; Omega -&amp;gt; Omega
&lt;br&gt;&lt;br&gt;&amp;gt; type Prop = Sub One
&lt;br&gt;&lt;br&gt;&amp;gt; false :: Prop
&lt;br&gt;&amp;gt; false = \i -&amp;gt; case i of
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Now x &amp;nbsp; -&amp;gt; subzero x
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Later d -&amp;gt; Later (false d)
&lt;br&gt;&lt;br&gt;&amp;gt; true :: Prop
&lt;br&gt;&amp;gt; true = Now &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- see subject line
&lt;br&gt;&lt;br&gt;&lt;br&gt;Alladat must &amp;nbsp;have to with 'coalgebras &amp;nbsp;give rise to toposes'. &amp;nbsp;But that
&lt;br&gt;requires more hunting &amp; gathering at the library on my part.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Best regards,
&lt;br&gt;Sebastian
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Make-the-most-of-Now-tp12092883p12092883.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-11765575</id>
	<title>Odelay</title>
	<published>2007-07-24T09:12:08Z</published>
	<updated>2007-07-24T09:12:08Z</updated>
	<author>
		<name>Sebastian Hanowski</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Been playing with &amp;nbsp;the partial monad a little &amp;nbsp;longer. Tried to
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; use it &amp;nbsp;for making the &amp;nbsp;equations of &amp;nbsp;section 3.4 of &amp;nbsp;these nice
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lecture notes
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.cs.bham.ac.uk/~mhe/papers/entcs87.pdf&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cs.bham.ac.uk/~mhe/papers/entcs87.pdf&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hold /definitionally/.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {-# OPTIONS -fglasgow-exts #-}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Given the suitable codata to capture divergence
&lt;br&gt;&lt;br&gt;&amp;gt; {-co-}data D a = Now a | Later (D a) ; never = Later never &amp;nbsp; &amp;nbsp;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; we &amp;nbsp;can &amp;nbsp; not &amp;nbsp;only &amp;nbsp;'race' &amp;nbsp; two &amp;nbsp;or &amp;nbsp;(infinitely &amp;nbsp; many) &amp;nbsp;more
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; computations against each other
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Now a &amp;nbsp; \/ _ &amp;nbsp; &amp;nbsp; &amp;nbsp; = Now a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; _ &amp;nbsp; &amp;nbsp; &amp;nbsp; \/ Now a &amp;nbsp; = Now a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Later d \/ Later e = Later (d \/ e)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; but also 'sync' two or finitely more of them.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Now a &amp;nbsp; &amp;nbsp; /\ Now _ &amp;nbsp; &amp;nbsp; = Now a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; a@(Now _) /\ Later d &amp;nbsp; = Later (a /\ d)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Later d &amp;nbsp; /\ a@(Now _) = Later (d /\ a)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Later d &amp;nbsp; /\ Later e &amp;nbsp; = Later (d /\ e)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; By &amp;nbsp;quotienting with &amp;nbsp;respect to &amp;nbsp;termination we &amp;nbsp;can have &amp;nbsp;this
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; initial fragment of the finite sets,
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; data Zero &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- {}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; type One = D Zero &amp;nbsp; &amp;nbsp; &amp;nbsp; -- {never}
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; type Two = D One &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-- {never,Now never}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allowing us to introduce the subset functor
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; type Sub a = a -&amp;gt; Two
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; which - like the contrapositive of negation - is contravariant.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( # ) :: (a -&amp;gt; b) -&amp;gt; Sub b -&amp;gt; Sub a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( # ) = flip (.)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((id :: a -&amp;gt; a) # ) = id :: Sub a -&amp;gt; Sub a
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((g . f) # ) = (f # ) . (g # )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; For &amp;nbsp;example /Sub &amp;nbsp;Two/ &amp;nbsp;gives the &amp;nbsp;topology &amp;nbsp;of the &amp;nbsp;Sierpinski
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; space, consisting of &amp;nbsp;(const never), id and &amp;nbsp;(const (Now never))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; which &amp;nbsp;correspond &amp;nbsp;to &amp;nbsp;{},{Now &amp;nbsp; never} &amp;nbsp;and &amp;nbsp;{never,Now &amp;nbsp;never}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; respectively. &amp;nbsp;But there'll &amp;nbsp;be no &amp;nbsp;characteristic function &amp;nbsp;for
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {never}.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;All this corresponds &amp;nbsp;more to constructive set &amp;nbsp;theory where to
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; give an element of the union of two sets it suffices to give one
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; from either &amp;nbsp;one but unlike &amp;nbsp;type theory it's not &amp;nbsp;recorded from
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; which one.
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; union :: Sub a -&amp;gt; Sub a -&amp;gt; Sub a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; union = \u &amp;nbsp; &amp;nbsp; -&amp;gt; \v &amp;nbsp; &amp;nbsp;-&amp;gt; \x &amp;nbsp; -&amp;gt; u x \/ v x &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; And so Conor's orwell-story 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=69&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=69&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /here/ can only be told with functions, not functors:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; zero :: Sub a
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; zero = const never
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; nogood f = &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f # zero -- &amp;gt; zero
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; orwell f a b = &amp;nbsp; &amp;nbsp;f # (a `union` b) -- &amp;gt; (f # a) `union` (f # b)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I'd really like to see the partial monad beeing integrated into
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; epigram, because it &amp;nbsp;not only gives safer &amp;nbsp;general recursion but
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; allows to express semi-deciadable properties like inequality for
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; codata.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cheers,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Sebastian
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Odelay-tp11765575p11765575.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-10356388</id>
	<title>applicative partial programming now</title>
	<published>2007-05-07T06:15:15Z</published>
	<updated>2007-05-07T06:15:15Z</updated>
	<author>
		<name>Sebastian Hanowski</name>
	</author>
	<content type="html">* Am 03.04.07 schrieb Isaac Dupree:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Aren't ALL monads applicative functors? (though not the converse), with:
&lt;br&gt;&amp;gt; pure = return
&lt;br&gt;&amp;gt; (&amp;lt;*&amp;gt;) = ap
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; And here are some invented (untested) direct definitions:
&lt;br&gt;&amp;gt; instance Functor D where
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; fmap f (Now a) = Now (f a)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; fmap f (Later d) = Later (fmap f d)
&lt;br&gt;&amp;gt; instance Applicative D where
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; pure = Now
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Now f &amp;lt;*&amp;gt; ma = fmap f ma
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; Later df &amp;lt;*&amp;gt; ma = Later (df &amp;lt;*&amp;gt; ma)
&lt;/div&gt;&lt;br&gt;Thanks for &amp;nbsp;really putting &amp;nbsp;things into perspective, &amp;nbsp;Isaac. Applicative
&lt;br&gt;functors seem to give a nice &amp;nbsp;interface to partial programming since one
&lt;br&gt;often needs &amp;nbsp;to feed the &amp;nbsp;impure results &amp;nbsp;of general recursive &amp;nbsp;calls to
&lt;br&gt;pure functions.
&lt;br&gt;&lt;br&gt;So given Idiomatica spoken fluently by the compiler
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://www.e-pig.org/epilogue/?p=139&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.e-pig.org/epilogue/?p=139&lt;/a&gt;&lt;br&gt;&lt;br&gt;in such &amp;nbsp;case one &amp;nbsp;just needs &amp;nbsp;to wrap the &amp;nbsp;returned values &amp;nbsp;with thoses
&lt;br&gt;funny brackets
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; iI ... Ii 
&lt;br&gt;&lt;br&gt;which signal the application of a pure function to effectful arguments
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; iI f mx1 ... mxn Ii
&lt;br&gt;&lt;br&gt;such that for example the fibonacci function from
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sneezy.cs.nott.ac.uk/fplunch/weblog/?p=3&lt;/a&gt;&lt;br&gt;&lt;br&gt;(together with lfp according to the spec) get's a rather ordinary outfit
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fib :: Integer -&amp;gt; D Integer
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fib = lfp (\ fib -&amp;gt; \ n -&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if n == 0 then iI 0 Ii
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if n == 1 then iI 1 Ii
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else iI (+) (fib (n-1)) (fib (n-2)) Ii )
&lt;br&gt;&lt;br&gt;It's also possible to blend in pure values.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fact :: Integer -&amp;gt; D Integer
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fact = lfp (\ fact -&amp;gt; \ n -&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if n == 0 then iI 1 Ii
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else iI (*) Pu n (fact (n-1)) Ii )
&lt;br&gt;&lt;br&gt;And now that even infixes are available
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fib :: Integer -&amp;gt; D Integer
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fib = lfp (\ fib -&amp;gt; \ n -&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if n == 0 then iI 0 Ii
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if n == 1 then iI 1 Ii
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else ii (fib (n-1)) (+) (fib (n-2)) )
&lt;br&gt;&lt;br&gt;one has &amp;nbsp;a bit &amp;nbsp;of a &amp;nbsp;workaround for cases &amp;nbsp;where it's &amp;nbsp;unfortunate that
&lt;br&gt;bracketing doesn't nest (in Haskell).
&lt;br&gt;&lt;br&gt;qsort :: [Integer] -&amp;gt; D [Integer] 
&lt;br&gt;qsort = lfp (\qsort xs -&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; case xs of
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[] -&amp;gt; iI [] Ii 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(x:xs) -&amp;gt; ii (qsort (filter (&amp;lt;x) xs)) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (++) 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (ii (return [x]) (++) (qsort (filter (&amp;gt;=x) xs))) )
&lt;br&gt;&lt;br&gt;And one can always prune redundant impurity.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nest :: Integer -&amp;gt; D Integer
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nest = lfp (\nest n -&amp;gt; if n == 0 then iI 0 Ii
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else iI nest (nest (n-1)) Ji )
&lt;br&gt;&lt;br&gt;&lt;br&gt;Best regards,
&lt;br&gt;Sebastian
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/allowing-%22almost%22-a-fixpoint--tp9726790p10356388.html" />
</entry>

</feed>
