[Agda] [Coq-Club] Concepts within Type Theory – Re: Type Theory vs. Set Theory – Re: Why dependent type theory?

Thorsten Altenkirch Thorsten.Altenkirch at nottingham.ac.uk
Sun Mar 15 17:12:01 CET 2020


Am 13.03.2020 um 17:19 schrieb Thorsten Altenkirch <Thorsten.Altenkirch at nottingham.ac.uk<mailto:Thorsten.Altenkirch at nottingham.ac.uk>>:

This means that types are the result of simple operations such as lambda abstraction and lambda application (cf. wff constructions (b) and (c) at [Andrews 2002 (ISBN 1-4020-0763-9), p. 211]).

This means you have a very intensional view of Mathematics centred around encodings. I think this is misleading because Mathematics is about abstraction and abstract concepts, encodings are only coincidental.

Of course, encoding is not a self-purpose.
That all logical connectives can be defined in terms of the Sheffer stroke is coincidental and not of particular interest.
But the concept of expressiveness (reducibility) used by Andrews (and intuitively by Church) is very natural, and for good reason many mathematicians endorse these formulations of higher-order logic (Church's type theory, Andrews' Q0, Gordon's HOL), and the implementations are widely used (HOL4, HOL Light, Isabelle/HOL).
In this concept, the reduction to certain primitive symbols is very natural and reveals the inner logic of high level notions.

First of all it is important to realize that Type Theory in the sense of Church and HOL and Type Theory in the sense of Martin-Loef are some completely different ideas which are only superficially similar in that the share the word Type and use lambda terms to some degree.

Type Theory ala Martin-Loef (MLTT) was intended as a foundation of constructive Mathematics, while the systems you refer to are based on very strong classical assumptions. The idea that there should be any sort of reduction from MLTT to Q0 or HOL is quite absurd. We understand reduction as explaining something, the notions you are used have no explanations from an intuitionistic point of view. This sort of reduction should be called complication, because it “reduces” something I can understand to something I don’t.

Moreover, using Andrews' concept of "expressiveness" (also intuitively used by Church before), all mathematical concepts can be reduced – naturally (not like in machine language) – to a few basic notions:
Q0 basically has a single variable binder (lambda), two primitive symbols and two primitive types, and a single rule of inference.
R0 has only little more (some features required for type variables, type abstraction, and dependent types).
Both are Hilbert-style systems (operating at the object language level only).

This seems to be a view of mathematical foundations stuck in the middle of the last century.

The notion of type theory you refer to seems to intend more than just preventing (negative) self-reference.
The univalence axiom, and the desire to „structure mathematical constructions in a reasonable way“ are motivated by philosophical or metamathematical considerations.
These motivations have their legitimation, but shouldn’t be part of the formal language.

For this reason I already object to the Pi type (as implemented in Lean), or dependent function type, which I consider a metamathematical notion: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/bvVem1BZCQAJ
I believe that type abstraction is fully sufficient to express what the Pi type is supposed to express.

So you are only interested in some mathematical machine code but not in the high level notions. Such a view of mathematical foundation is akin to the view some programmers had (and maybe still have) that all what matters is machine code. To the contrary you can build the same foundations on different notions of machine code. The machine code is irrelevant, all what matters are the abstractions.

It is important to distinguish two different kinds of high level notions:
Those that can be reduced naturally to primitive symbols, and those which try to express metamathematical ideas (which seems to be your notion).
The latter shouldn't be implemented as primitive symbols in the basic formal language, but should be the result of metamathematical reasoning.

This is the game you are playing which seems to be some sort of glass pearl game to me. Modern type theory is quite close to basic mathematical intuitions and is based on organizing mathematical objects as types – it makes only sense to talk about elements of types. Propositions do not arise as primitive concepts but they can be understood as types which carry no information. A predicate over a type A is a function P : A -> Prop, and proving that a predicate holds universally is to exhibit an element of the Pi type: Pi x:A.P x. In this way Pi-types are not a “metamathematical notation” but they are the very base of understanding the meaning of quantification. However, Pi-types have more applications, for example we can use it to give precise types to operations like matrix multiplication indexed by dimensions.

Type Theory also is very successful to work with structural Mathematics in the sense of category theory. Understanding this is at the core of Homotopy Type Theory. Type Theory by its very nature only allows structural operations, that is we cannot observe encodings. The payback is in the univalence principle which basically says that structural equivalence (for example equivalence of categories) is equality. This notion of equality is a bit unusual in that equality in general is not a proposition but a structure, i.e. there is usually more than one isomorphism between sets. I think there is a deep connection between the constructive and structural nature of type theory, even though classical Mathematicians may be more interested in the latter.

 How is type abstraction implemented in Lean, and where can I find the group definition?

I have no idea about Lean, not do I know what you mean by “type abstraction”. Polymorphism, that is constructions which are parametric in types are simply depdnent functions which have a universe as input.

Lambda as the single variable binder in formulations of higher-order logic (Church, Andrews, Gordon) traditionally can be used to bind _term variables_ only.
Type abstraction allows for binding _type variables_ also.
See https://owlofminerva.net/kubota/software-implementation-of-the-mathematical-logic-r0-available-for-download/
and https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2018-September/msg00045.html
Kevin Buzzard has (like Freek Wiedijk) correctly stated that current classical higher-order logic is too weak to express certain mathematical concepts.
The main reason is that the feature of type abstraction is missing.
Gordon has suggested implementing this, but unfortunately this didn't happen in the current HOL systems (HOL4, HOL Light, Isabelle/HOL).
Andrews and Melham did some work into this direction, but used the traditional quantifiers to bind type variables, not lambda.

In MLTT or HOTT, type quantification is handled via the notion of a universe U. Quantification over a universe is handled like quantification over any other type. So for example List is simple a function U -> U, and a polymorphic function like reverse has a Pi type: Pi A : U, List U -> List U. Indeed here are 2 Pi-types at play here a dependent one Pi, and a non-dependent one -> which is a special case of the dependent one.

Concerning constructivism (intuitionism) and intensionality, these are philosophical debates with little relevance for mathematics nowadays.
I fully agree to Kevin Buzzard’s argument that "within mathematics departments, the prevailing view is that Hilbert won the argument 100 years ago and we have not looked back since, despite what constructivists want us to believe." – https://xenaproject.wordpress.com/2020/02/09/where-is-the-fashionable-mathematics/

I think you miss a trick or two here. Constructivism is highly relevant, especially in computer science when we want to marry computer science with mathematical constructions. Hilbert is already dead since a while and before the first computer has been build. The world is changing, maybe philosophers and:  mathematicians should take notice of this.

The formulation of the formal system depends on the purpose.
Even within mathematics different formulations are required: https://groups.google.com/d/msg/metamath/Fgn0qZEzCko/lArtWey5CQAJ (last part on the two-step approach).
However, from a logical (mathematical) point of view I do not see any need for constructivism.

We should strive to explain our notions, not just apply some formal reduction. Classical reasoning is based on the idea that mathematical objects behave like objects in the real world (actually maybe even the real world isn’t completely classical if we take quantum theory into account). This seems quite preposterous because they are really constructions in our head and an absolute notion of truth isn’t really available here. However, it turns out this is also unnecessary: instead of appealing to platonic truth we can just talk about evidence. That means a proposition is not something which is true or false, but a proposition is something you can have evidence for. The evidence can be expressed as a type and this is the core of the propositions as types explanation (sometimes called Curry-Howard equivalence). Once you go with this you find that there is another, intuitively appealing way to do Mathematics which provides much more explanatory power. It also links well with computer science or more generally with the need to link mathematical constructions to effective procedures.

It is true that many main stream Mathematicians aren’t very concerned with intuitionism. Clearly this is a cultural phenomenon and to conclude that it should be so because it is so seems to be a fallacy. A good understanding of both classical and constructive notions should be at the core of a decent mathematical education.



This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment. 

Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored 
where permitted by law.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/agda/attachments/20200315/3b44739e/attachment.html>


More information about the Agda mailing list