Git Product home page Git Product logo

Comments (14)

DanGrayson avatar DanGrayson commented on June 12, 2024

I've started on this, Sep 29, 2015.

from unimath.

DanGrayson avatar DanGrayson commented on June 12, 2024

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.

DanGrayson avatar DanGrayson commented on June 12, 2024

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.

vladimirias avatar vladimirias commented on June 12, 2024

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.

DanGrayson avatar DanGrayson commented on June 12, 2024

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.

langston-barrett avatar langston-barrett commented on June 12, 2024

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", where f 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 ns -- I'm almost certainly just doing it wrong. Have you been able to make headway on this issue @DanGrayson?

from unimath.

DanGrayson avatar DanGrayson commented on June 12, 2024

@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.

langston-barrett avatar langston-barrett commented on June 12, 2024

@DanGrayson Yeah, that's a better way of phrasing it :)

from unimath.

DanGrayson avatar DanGrayson commented on June 12, 2024

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.

rmatthes avatar rmatthes commented on June 12, 2024

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.

DanGrayson avatar DanGrayson commented on June 12, 2024

Can you give more detail or point us to the code?

from unimath.

mortberg avatar mortberg commented on June 12, 2024

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.

fpvandoorn avatar fpvandoorn commented on June 12, 2024

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.

rmatthes avatar rmatthes commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.