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

Ken Kubota mail at kenkubota.de
Mon Mar 16 22:13:57 CET 2020


> Am 15.03.2020 um 17:18 schrieb Thorsten Altenkirch <Thorsten.Altenkirch at nottingham.ac.uk>:
> 
> From: Agda <agda-bounces at lists.chalmers.se <mailto:agda-bounces at lists.chalmers.se>> on behalf of Ken Kubota <mail at kenkubota.de <mailto:mail at kenkubota.de>>
> Date: Saturday, 14 March 2020 at 22:00
> 
> 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.
>  
> 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.
> 
There are some misunderstandings here.
I didn't suggest reducing MLTT to Q0 or HOL.
Of course I am well aware of the fact that classical foundations and constructive foundations are based on different ideas, see box 3.3. at https://owlofminerva.net/files/fom_2018.pdf#page=1 <https://owlofminerva.net/files/fom_2018.pdf#page=1>

With reducing (in the sense of Andrews' expressiveness) I refer to establishing mathematical concepts – naturally – from a few primitive symbols and rules.
For a trivial example I would refer to the definition of the logical connectives and the quantifiers by Church and Andrews, as can be seen at https://www.owlofminerva.net/files/formulae.pdf#page=359 <https://www.owlofminerva.net/files/formulae.pdf#page=359> and the following pages, or at https://owlofminerva.net/sep-q0 <https://owlofminerva.net/sep-q0>

Another example is the single rule of Q0, from which all other rules are derived:
Andrew M. Pitts on the natural deduction system HOL in comparison to the axiomatic (Hilbert- style) deductive system Q0: “From a logical point of view, it would be better to have a simpler substitution primitive, such as ‘Rule R’ of Andrews’ logic Q0, and then to derive more complex rules from it.” [Gordon and Melham, 1993, p. 213] – https://owlofminerva.net/files/fom_2018.pdf#page=6 <https://owlofminerva.net/files/fom_2018.pdf#page=6>


> 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.
> 
My argument would be that what can be expressed by the Pi types could be expressed more naturally with type abstraction.
It would be helpful to have the canonical definition of groups in Lean (using the Pi type) in order to compare it with others.

The definition of groups in R0 can be found here: https://www.owlofminerva.net/files/formulae.pdf#page=362 <https://www.owlofminerva.net/files/formulae.pdf#page=362>
In the Lean library I couldn't find the canonical definition (associativity, identity element, inverse element): https://github.com/leanprover-community/mathlib/tree/master/src/group_theory <https://github.com/leanprover-community/mathlib/tree/master/src/group_theory>


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

The question is what advantages constructive foundations can offer.
The arguments and presentations usually mention some philosophical reasoning (intuitionism), a certain mode of expression (Curry-Howard isomorphism), or computational advantages.
But from a mathematical (logical) point of view, I cannot see any advantage.

The current constructive main implementations (Coq etc.) have dependent types, the current classical main implementations (HOL4, HOL Light, Isabelle/HOL) don't.
But this an implementation issue, and not an issue of classical vs. constructive foundations.

Therefore I favor classical foundations with dependent types, which seems to be what Kevin Buzzard is looking for, too.


Kind regards,

Ken Kubota

____________________________________________________


Ken Kubota
doi.org/10.4444/100 <https://doi.org/10.4444/100>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/agda/attachments/20200316/0bab6b96/attachment.html>


More information about the Agda mailing list