Comments (14)
I've started on this, Sep 29, 2015.
from unimath.
Benedikt suggests also formalizing the traditional induction principle for lists, which
would arise from defining lists inductively. Do that without assuming X is a set.
PS: Anders did this in commit ce2e165
from unimath.
Also re-implement lists as functions from finite ordered sets to X. This might
be more convenient, as the use of it would not involve futzing with natural numbers.
A start was made here: https://github.com/DanGrayson/UniMath/blob/090d5f7514ea92588952f4506b1c512871d9e167/UniMath/Ktheory/OrderedSet.v
from unimath.
How is a finite ordered set different from stn n paired with the natural order on it?
BTW - I think, generally it is better not to pair things such as ( A B ) when B can be computed from A.
On Sep 30, 2015, at 11:28 AM, Daniel R. Grayson [email protected] wrote:
Also re-implement lists as functions from finite ordered sets to X. This might
be more convenient, as the use of it would not involve futzing with natural numbers.—
Reply to this email directly or view it on GitHub #173 (comment).
from unimath.
On Wed, Sep 30, 2015 at 12:10 PM, Vladimir Voevodsky [email protected] wrote:
How is a finite ordered set different from stn n paired with the natural order on it?
The two types are equivalent, as is "nat", but the type of finite ordered sets might be more convenient to use, because "coprod" of two finite ordered sets can be ordered, whereas "coprod" of two standard finite sets is not a standard finite set. Perhaps that's not a big enough advantage to justify the work in making a second implementation of lists, but it's the way Bourbaki actually speaks of associativity.
BTW - I think, generally it is better not to pair things such as ( A B ) when B can be computed from A.
I agree. In which of my type definitions do you see me doing that? A finite ordered set
is a set with a proof of finiteness and an ordering. There is no way to deduce an
ordering from a proof of finiteness.
from unimath.
More generally, it would be nice to have a notion of a finite combination/product/composition of elements for any set with a binary operation. This could be used to define:
- presentations by generators and relations
- the notion of linear dependence (essential for developing free modules i.e. linear algebra, which there is none of right now!)
- general statements such as "
f
is multilinear", wheref
takes inputs from any finite product of vector spaces - and so on...
I've made an attempt in this direction, but got stuck in a quagmire of proving more and more basic facts about stn n
s -- I'm almost certainly just doing it wrong. Have you been able to make headway on this issue @DanGrayson?
from unimath.
@siddharthist - could you tell me what you mean by "a notion of a finite combination/product/composition of elements for any set with a binary operation" ? Is it the same thing as a "word"?
from unimath.
@DanGrayson Yeah, that's a better way of phrasing it :)
from unimath.
In that case, I use an inductive type in Ktheory/Monoid.v to define word
, but the rule now is that we don't introduce new inductive types in UniMath, so that has to be redone, but I haven't thought about how to do so.
For what it's worth, here is the definition:
Inductive word X : Type :=
| word_unit : word X
| word_gen : X -> word X
| word_op : word X -> word X -> word X.
from unimath.
If X is a set, then this is a particularly simple instance of what Anders, Benedikt and I implemented in substitution systems, based on omega-cocontinuous functors. word_gen corresponds to the inclusion of variables into terms, and there is no variable binding.
from unimath.
Can you give more detail or point us to the code?
from unimath.
A place to start looking is the implementation of lists, binary trees and the lambda calculus:
https://github.com/UniMath/UniMath/blob/master/UniMath/CategoryTheory/Inductives/Lists.v
https://github.com/UniMath/UniMath/blob/master/UniMath/CategoryTheory/Inductives/Trees.v
https://github.com/UniMath/UniMath/blob/master/UniMath/CategoryTheory/Inductives/LambdaCalculus.v
I think your inductive type would be a variation of the lambda calculus without the "lambda constructor", but with a unit constructor.
from unimath.
How does
https://github.com/UniMath/UniMath/blob/master/UniMath/CategoryTheory/Inductives/Lists.v
compare to
https://github.com/UniMath/UniMath/blob/master/UniMath/Combinatorics/Lists.v ?
I started using the latter.
from unimath.
A maybe scholastic answer would be that they are weakly equivalent. The lists in CategoryTheory are an instance of a generic construction (initial algebras of omega-cocontinuous functors), the ones in Combinatorics are a very concrete implementation that works fine for lists. My first guess is that if the lists are the only needed data type, then the concrete implementation would be fine, but if other data types came in, it would be better if they all came from the same first principle.
from unimath.
Related Issues (20)
- Beta-reduction for pairs is problematic
- New package: order theory HOT 10
- Get rid of UU : UU warning?
- Code should be reactivated [was: Compilation seems to hang at Qed.] HOT 9
- Using PathOver in definitions and constructions of displayed things? HOT 3
- Error `/bin/sh: Argument list too long` when doing `$ make install` HOT 13
- there are competing implementations of a full subcategory HOT 9
- how to keep track of which .v files of UniMath are being compiled?
- which version of Coq are we allowed to use? HOT 2
- Please pick the version you prefer for Coq 8.18 in Coq Platform 2023.10 HOT 4
- A warning HOT 4
- Defining objects, morphisms and categories separately or together HOT 3
- Error "Argument list too long" when running sanity checks HOT 3
- Who are contributors anonymous-1234567 and anonymous-13243557? HOT 3
- compilation problems in CI with Coq 8.20 (dev) HOT 2
- Please help debug ltac induced error HOT 2
- Updating names with "wrong capitalization" HOT 5
- Reversible coercions HOT 1
- Compile times for model categories HOT 3
- Coqdoc generation documentation and reduction HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unimath.