However, the way collections are set-up in MLTT makes it impossible,
by construction, to even formulate the question of whether two
collections have the same elements.
foundation for mathematics, then I agree that the axiom of injective
constructors is a lousy one. If you're implementing a proof assistant
then it is a very tempting, if you can afford it.
With kind regards,
Andrej
--
On 05/10/15 09:55, Matt Oliveri wrote:
> On Monday, October 5, 2015 at 2:16:03 AM UTC-4, Martín Escardó wrote:
>> OK, given this assertion, can we add a non-lousy axiom that proves
>> Odd/=Even, if I want it to be a foundation of mathematics (and have a
>> proof assistant)?
>
> Probably, if you consider axioms based on PER or set semantics to be
> sufficiently non-lousy.
"lousy" was Andrej's terminology, and I couldn't resist answering to him
with his own adjective. It was not meant to offend anyone: only to tease
him.
We can certainly talk about the NuPrl type theory, if we wish, but it is
significantly different from Martin-Loef type theories, in particular by
being based in an untyped universe of things, out of which every NuPrl
type is constructed by carving a subset, very much in the spirit of set
theory, as far as I understand.
You should not extrapolate any claim I make about Martin-Loef type
theories to NuPrl. In fact, I am not qualified to make any claim about
NuPrl, because I haven't studied it (and perhaps even the last sentence
of the previous paragraph is wrong).
All I am saying is this: While it may (or may not) make sense to add the
equality reflection rule to the first layer of types in MLTT (e.g. for
natural numbers N, for function types N->N etc.), adding the equality
reflection for the universe itself seems much more dubious to me.
Why? Well, because at the same time (1) you prevent equality from being
isomorphism (or equivalence to be precise) but (2) you still leave
equality in U largely undetermined (to the extent that the inhabitedness
of Id U Evens Odds is undecided).
I asked (and this was a genuine question) what "axioms" one can add to
such an equality-reflecting MLTT so that the meaning of Id U Evens Odds
is resolved.
Interesting, Gabriel. And you don't use equality reflection.
However, parametricity is anti-classical, as is well known. A general
foundation of maths should be compatible with both classical mathematics
and constructive mathematics, which MLTT type theories seem to be.
One question I asked before was whether there is an axiom for
Id-equality in MLTT such that Id-equality of types (in a universe
[interpreted as a Grothendieck universe]) turns out to be equality in
the [constructive or classical] set-theoretical interpretation.
Do you have some specific formulation of "parametricity" in mind that
inspires this axiom?
But notice that injectivity doesn't hold in the set-theoretical
interpretation of types, as I have already illustrated in a previous
message in this thread:
We have that the cartesian products 0*0 and 0*1 of the empty set 0
and the one-element set 1 are equal (empty) sets, but from
injectivity of Sigma we would get that 0=1, which of course is not
the case.
Id U Odds Evens -> 0. [Not provable, even in extensional MLTT.]
The Sigma type constructor in MLTT of course has many uses. Under the
CH interpretation, it expresses a (strong) form of existence.
But also, it is said, Sigma types can be used to define subtypes, e.g.
Odds = Sigma(n:N). isOdd(n).
Evens = Sigma(n:N). isEven(n).
These types are isomorphic. Most people, perhaps based on the standard
set-theoretical interpretation of MLTT, would consider these two types
to be different.
However, even if the equality-reflection rule for the universe U in
which the types Odds and Evens live, producing an equality of type
Id U X Y
from any given judgemental equality
X=Y,
were added to MLTT, to get so-called extensional MLTT, one still
wouldn't be able to prove/inhabit the negated type
Id U Odds Evens -> 0. [Not provable, even in extensional MLTT.]
So, although extensional MLTT somehow refuses to accept that
isomorphic types are equal, it can't prove that they are not. Let's be
more precise.
This "oddity" arises much before we think of univalance, and, indeed,
is present in extensional MLTT, which is incompatible with
univalence, as we have just discussed.
In fact, it is much easier to reconcile intensional MLTT than
extensional MLTT with the above phenomenon: the univalence axiom UA is
consistent with intensional MLTT. So, even if we don't postulate UA,
its consistency explains this phenomenon: nothing prevents the type
Odds from being equal to Evens, in intensional MLTT. Moreover,
anything we can prove about one of these two types can be proved about
the other.
But how does one reconcile this phenomenon with extensional MLTT? On
the one hand, if we were to have an inhabitant of the type
Id U Odds Even,
in extensional MLTT, it would have to be unique, and so equality can't
amount to isomorphism in this case. On the other hand, it is
consistent that the type
Id U Odds Even
has an inhabitant. But what would this inhabitant be, if it happens to
exist? It is necessarily contingent: it would have to be a unique
isomorphism, but of course there isn't a canonical choice of an
isomorphism.
I think that this illustrates that it is difficult to deny the
inevitability of the univalence axiom on the grounds of some presumed
"naturality" of the equality reflection rule (as I heard some people
arguing). My contention is that the above argument shows that the
equality reflection rule for the elements of U is rather unnatural,
not because it contradicts univalence, but because it fails to
precisely determine the type Id U X Y in any useful (mathematical,
philosophical or practical) way.
Another type that arises in the above way is the fiber, or inverse
image of a point y:Y, under a function f:X->Y,
fiber f y = Sigma(x:X). f(x)=y.
One can read this as "the type of x's that are mapped to y by f".
But I think that this reading is problematic if taken too literally in
the set-theoretic sense (although it makes perfect sense in all models
of MLTT we currently have in mind, univalent or not).
For instance, consider the parity function f:N->2 that maps even
numbers to 0 and odd numbers to 1. Then its two fibers are
manifestations of the types Evens and Odds, intuitively, but this
cannot be expressed formally: there is no internal distinction between
these four types, and no particular fiber can be claimed to be a
manifestation of the type Evens, as opposed to the type Odds, for
instance, although an intuition guided by sets leads us to see the
type fiber f 0 as the same thing as the type Evens, but not
necessarily the type Odds.
QUESTION (to try to emphasize my point). Is there any sensible axiom
for MLTT (even if we didn't want to adopt it) that, in the presence of
the equality-reflection rule (or not), allows to prove the negation of
Id U Even Odds?
For example, certainly the K axiom is not such an axiom, even though
it denies univalence.
Martin
On Tue, Oct 6, 2015 at 11:50 PM, Matt Oliveri <atm...@gmail.com> wrote:Sorry for not being specific enough. I am not claiming that injectivity captures the full details of relying on an untyped model (for this I think, as you somewhat sketched in a previous message, that we could internalize the forgetful map from typed terms to their erasure into a uni-type of dynamic values, with a counterpart inside this type of each term former). The specific (partial) aspect I was trying to capture, and for which I think injectivity is a nice answer, is the idea that "equal sets have the *exact* same elements". This is weaker (I think?) than fully buying untyped model, and it is precisely the aspect I find interesting.
> (1) I don't agree that injectivity of type constructors properly captures untyped reasoning.
I also agree that it makes no sense to claim injectivity of union and intersection; those are not "structural" type formers in the sense that they do not determine the head structure of their canonical inhabitants. Injectivity only makes sense for the type connectives that reflect term formers already present in the untyped model.
On UIP: wouldn't be consistent to assume two different identity proofs (say (w1 /= w2 : Unit -> Unit)) whose transport function are (pointwise) equal to the identity?
On another note, it is also known that equality reflection implies UIP (http://ncatlab.org/nlab/show/extensional+type+theory). (That said we could have OTT-inspired type theories where definitional equalities actually computes, and there UIP and identity reflection might be compatible with a model where equalities are not interpreted as the identity).
On Wed, Oct 7, 2015 at 1:21 AM, Martin Escardo <m.es...@cs.bham.ac.uk> wrote:But notice that injectivity doesn't hold in the set-theoretical
interpretation of types, as I have already illustrated in a previous
message in this thread:
We have that the cartesian products 0*0 and 0*1 of the empty set 0
and the one-element set 1 are equal (empty) sets, but from
injectivity of Sigma we would get that 0=1, which of course is not
the case.
Sorry for being possibly naive on this question, but is this counter-example really correct? My understanding of is that injectivity applied to Sigma(x:0).0 and Sigma(x:0).1 gives you the following (propositional equalities):
0 = 0andforall (x:0), 0 = 1As an instance of the general pattern:
Sigma(x:A1).B1 = Sigma(x:A2).B2
implies
Sigma(w:A1=A2). Pi(x:A1), B1 x = B2 (transport w x).(or possibly the squashing of that, if you want a canonical principle)
I think it is consistent to have 0 = 1 (propositionally) under the assumption (x:0).
--
The mistake is the line
G |- pi1(0,p) = 0 : NN
(0,p) is actually tagged with the predicate Even, but the pi1 is tagged with Odd. The beta rule doesn't apply, in regular ETT. In Nuprl it does, since terms truly have no type annotations. This is the difference we've been discussing between ETT and systems like set theory and Nuprl.
in type theory with equality reflection you have to explicitly
annotate the types of all applications and projections.
There is no proof of Id U Evens Odd → 0 because it is consistent with
type theory that in fact Evens ≡ Odds. (Consider the cardinal model I
described earlier.)
Yes, they should be annotated, or else very strange things happen. I
spoke about it in Paris at the seminar.
The category of cardinals and functions is skeletal. There are no
coherence issues as isomorphic objects are equal.
What I know is how to prove
Id U (Nat → Bool) (Nat → Nat) → 0
using untagged applications and λ-abstractions, β-reductions, and
equality reflection. This shows that either the type theory is
unreasonable, or that set theory is not a model of it. I prefer to
think that set theory should be a model of type theory.
From the point of view of
denotational/categorical semantics it makes perfect sense to tag
everything to death.
On Wed, Oct 7, 2015 at 11:31 PM, Matt Oliveri <atm...@gmail.com> wrote:
> You mean the category of sets, right? ZF sets would still model types (and
> terms), I think. After all, the ZF function spaces (Nat->Bool) and
> (Nat->Nat) are different. For example, only one has an identity function.
I do not quite understand the difference between the "category of
sets" and "ZF sets",
but let me just point out, again, hat Nat → Bool
and Nat → Nat are isomorphic sets. In a previous message I described
how you can get them to be equal by tewaking the meaning of →, and
this had nothing much to do with whether we're in a category or not.
Under the isomorphism the identity function of Nat → Nat simply
becomes some other function Nat → Bool. What this tells us is not that
Nat → Bool and Nat → Nat are "really different" as bare objects but
rather that they are different as structures, namely exponentials.
This whole discussion has a distinctly non-mathematical character. In
ordinary mathematics, if there is such a thing, it is mostly
uninteresting to worry about the distinction between isomorphism and
equality. This is why univalence is such a great thing.
On 07/10/15 23:01, Andrej Bauer wrote:
This whole discussion has a distinctly non-mathematical character.
In ordinary mathematics, if there is such a thing, it is mostly
uninteresting to worry about the distinction between isomorphism and
equality. This is why univalence is such a great thing.
It would be nice if you were right, but I see many mathematicians
doing things like (for example) building lattices by taking powersets
ordered by inclusion. That's *why* we might wish for Even to
not equal Odd, so that we can distinguish the elements of P(N)!
On Thu, Oct 8, 2015 at 4:07 AM, Matt Oliveri <atm...@gmail.com> wrote:
> Actually, I thought your tweak to (->) crucially depends on thinking of
> functions as points of an exponent object. That way, we know the domain and
> codomain of the function we're applying. If you take a raw function of ZF,
> you don't know it's "codomain". What is that? You know the set of mappings
> that the function is. So actually, you know its domain and its image. You
> can't define application to treat cases specially based on the codomain. Not
> all functions in (Nat->Nat) map onto the whole of Nat, so you'd get
> confused. (In fact, Bool is usually a subset of Nat, so you'd get confused
> right away.)
You are confusing levels. The exponential operation → does not act on
functions but rather on sets. There is no mystery about "knowing the
codomain" because → is given both the domain and codomain as
arguments. And by the way, A → B produces *two* things, namely a set,
let us call it Exp(A,B) and a map ev_{A,B} : Exp(A,B) × A → B,
satisfying the usual conditons for an exponential.
All I am saying is that we can "fix" Nat → Bool so that Exp(Nat, Bool)
can be any desired set of continuum cardinality. Of course, we need to
change ev_{Nat, Bool} accordingly. Perhaps I should spell out the
details (again)?
Suppose we wish to replace Exp(Nat, Bool) with a set X which is
isomorphic to it. Let f : X → Exp(Nat, Bool) be such an isomorphism.
Redefine Nat → Bool to be
Nat → Bool := (X, ev')
where ev' : X × Nat → Bool is defined by
ev'(x, n) := ev_{Nat,Bool} (f(x), n).
It is obvious that (X, ev') is an exponential of Nat and Bool.
This construction works also if you do not "think of objects". We can
formulate the → operation in straight set theory and perform exactly
the same modification.
Id U Odds Evens -> 0. [Not provable, even in extensional MLTT.]
What I know is how to prove
Id U (Nat → Bool) (Nat → Nat) → 0
using untagged applications and λ-abstractions, β-reductions, and
equality reflection.
One final thought on this thread.Martin's new criticism of "extensional" type theory, more precisely, the addition to MLTT of the equality reflection rule, is that it still doesn't render equality sharp enough:Id U Odds Evens -> 0. [Not provable, even in extensional MLTT.]Others have pointed out that it is provable whenever one has injectivity of type constructors.But this assumption is not necessary: this fact is already provable in MLTT + reflection.The derivation uses standard computation rules, which do not check equality between type arguments of the elimination-introduction pair.
Since it's a question of logic rather than implementation, we should try to reach a consensus what the so-called ETT should really be.
I do not want to take sides. I think Andrej's position makes sense from the implementation point of view. (Even if the semantic example I find rather artificial.)
--
You received this message because you are subscribed to a topic in the Google Groups "Homotopy Type Theory" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/HomotopyTypeTheory/qydSwbvj1uE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to HomotopyTypeThe...@googlegroups.com.
The question is whether untyped reduction is natural.
I think it's natural.
It's certainly what we do on paper.
It's what happens in set theory.
It's also what Coq does.
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 send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.
It's certainly what we do on paper.
It is not what I do on paper. Get a new sheet!
> In dependent type theories, term constructors – such as abstraction,
> application, projection, etc. – are *always* annotated with type
> arguments
....
This is false beyond all doubt. It was never the case in MLTT 1979-1985,
Σ-elimination
(x ∈ A, y ∈ B(x)) c ∈ (Σx ∈ A)B(x) d(x,y) ∈ C((x,y))
E(c, (x, y) d(x, y)) ∈ C(c)
First of all, let's be clear on what this debate is NOT about.In dependent type theories, term constructors – such as abstraction, application, projection, etc. – are *always* annotated with type arguments (which appear in the corresponding inference rule), even if, in most cases, these arguments can be inferred, and therefore kept hidden.The debate is about whether the computation rules should require checking the equality of these arguments in the intro-elim pair, or whether the language should be designed so as to make such checks unnecessary.
But if the computation rules ignore the type annotations, why should elim forms be annotated? What difference in meaning do those annotations make?
(I know that for bidirectional checking and other proof theoretic tricks, annotations can go wherever it's convenient. That's not what I'm asking about. Which annotations are actually meaningful?)
Annotations on intro forms may also fail to be meaningful, depending on the model. For set theory, the domain annotation on a lambda is meaningful, but a codomain annotation would not be. You could create an alternative encoding of functions where both would be meaningful. In Nuprl, no annotations on intro forms are meaningful.
Of course, in the absence of untyped reduction, you get to abstract away from these particulars. The price you pay is that you must pessimistically assume all annotations are meaningful.