Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish proving braid-transpos (in Level0) #52

Closed
vikraman opened this issue Jan 25, 2021 · 19 comments · Fixed by #83
Closed

Finish proving braid-transpos (in Level0) #52

vikraman opened this issue Jan 25, 2021 · 19 comments · Fixed by #83
Assignees
Labels
Projects

Comments

@vikraman
Copy link
Owner

It looks like a hexagon but it doesn't match any existing pi combinators?

@JacquesCarette
Copy link
Collaborator

I'm going to guess that it is, but that one needs to first shuffle things into place. Our combinators might be 'wrong-handed' (syntactically), but a combination of what is there imply what is needed.

@vikraman
Copy link
Owner Author

vikraman commented Jan 26, 2021

It might be an application of two hexagons like this.
image

@JacquesCarette
Copy link
Collaborator

That would be rather sneaky, wouldn't it? Hmm, I'm not quite seeing the relation between the two diagrams though.

What I'm seeing on the left reminds me of some quantum circuit equivalences that are only true when the X exists, but not derivable otherwise. We can just add a + X to the rhs diagram to make it look like the one on the left...

I'm guessing that you have more in your head than what you're communicating here, so that I'm not quite able to bridge the gap. [And I have not had a chance to play with it yet, it might be obvious if I did. But not today, unfortunately.]

@vikraman
Copy link
Owner Author

vikraman commented Jan 26, 2021

It is basically this diagram from the last step in Maclane's proof, except there he collapses the hexagons to triangles by forcing the assoc/units to identities, so we have to work out the proof relevant version of this. (My previous diagram isn't correct)

image

@JacquesCarette
Copy link
Collaborator

Ah indeed. Very helpful. I was going to look at some of the proofs of Maclane's coherence theorem - I think Dybjer's paper might skip fewer details. If only I could remember the title of that paper!

@vikraman
Copy link
Owner Author

Might be this paper? This is only monoidal though.

@JacquesCarette
Copy link
Collaborator

Aha - https://www.researchgate.net/publication/227308222_Extracting_a_proof_of_coherence_for_monoidal_categories_from_a_proof_of_normalization_for_monoids . Also, there might be useful material in this nLab page

@JacquesCarette
Copy link
Collaborator

I've spent multiple hours, using pen and paper, to scribble many many things, to no avail. I've tried from both ends of what is being asked, and nothing goes. I mean, lots and lots of rewrites are possible, but none of them make things get any closer.

In particular, in the hole, and derived things from that, there is nothing quite like that diagram (i.e. the outer edge compositions). The issue seems to be that the ' . 1' on the right in the above (which is + Id in our case) just isn't there in what we're asked to prove by Agda.

@JacquesCarette
Copy link
Collaborator

Hmm, I've had a couple more ideas of things to try. One weird thing some of the coherence proofs do (for the pure monoidal case) is to introduce some unitors "in the middle", only to eliminate them later. I had definitely not done that. Plus I've spotted a use of the pentagon equation that I had not considered in that shape.

Maybe what I first need to do is to prove the above 'last step' formally, as a warm-up.

@inexxt
Copy link
Collaborator

inexxt commented Jan 31, 2021

Not sure if it helps, but we found this diagram in Joyal&Street paper:
https://www.sciencedirect.com/science/article/pii/S0001870883710558
page 15.

@JacquesCarette
Copy link
Collaborator

It surprisingly doesn't - I had re-derived that one multiple times while noodling around.

The problem is the 'outer' (Id +). (Id + swap) is great, (Id + c) for c some non-trivial combinator expression, not so much.

I'm starting to wonder if the problem might be that the proof at the lower-level is the problem. I wouldn't think that it's wrong, just that it is not coherently chosen to fit with the rest. I suspect that it is too specialized to the case of having 1 as a type, instead of being fully polymorphic.

@inexxt inexxt changed the title Fill hole in Level0 line 178 Finish proving braid-transpos (in Level0) Feb 8, 2021
@inexxt inexxt linked a pull request Feb 26, 2021 that will close this issue
@vikraman vikraman added this to To do in Pi+ via automation Feb 26, 2021
@vikraman vikraman moved this from To do to In progress in Pi+ Feb 26, 2021
Pi+ automation moved this from In progress to Done Feb 27, 2021
@JacquesCarette
Copy link
Collaborator

So if I'm reading the diffs properly, in the new encoding braid-transpos^ is what solves this? It now looks so 'easy'! What was the key idea?

@vikraman
Copy link
Owner Author

I think there have been many changes since this diff. We're now working with an indexed version of the syntax (indexed by the cardinality), and further we've defined Pi^ which is a normalised version of Pi syntax. We can show that Pi^ is complete wrt the semantics, and now we're trying to prove the equivalence between Pi and Pi^. The braid-transpos^ is the corresponding lemma for Pi^ which is simpler to prove, but the hexagon problem just got shifted somewhere else in the equivalence between Pi and Pi^.

@inexxt
Copy link
Collaborator

inexxt commented Mar 12, 2021

More precisely, I believe it got shifted there:

in s₁ ◎ (id⟷₁ ⊕ s₂) ◎ s₁ ⟷₂⟨ TODO! ⟩

@JacquesCarette
Copy link
Collaborator

I had indeed noticed that there had been very major changes. But, as a now completely outside onlooker, I'm still quite interested in trying to understand. And it didn't seem like this obligation would disappear - and indeed it has not, just moved.

Indexing by the cardinality is indeed a nice idea. I guess since you're using HoTT, you have use just one and a bunch of transports to tweaks the types. [If you use 2, no transports are needed at all, which I personally find more appealing.]

@sabry
Copy link
Collaborator

sabry commented Mar 12, 2021 via email

@vikraman
Copy link
Owner Author

Not sure if I follow, types are indexed by one number, combinators are indexed by two numbers.

The transport appears when moving from combinators to words in Sn, we have to pick a natural number, so we use a helper lemma to say that n <--> m implies n == m and then use n.

@JacquesCarette
Copy link
Collaborator

I think it is now conventional wisdom that permutations (at least in dependent type circles) is an isomorphism between Fin n and Fin m, and a provable theorem that n = m. And isos are between a type A and a type B - and there is no a priori reason that these have to be of the same size. It's again a theorem that they are.

(Just saw @vikraman 's reply as I was typing). Indeed, at the point where you go to Sn, you need transport, it is inevitable.

@vikraman
Copy link
Owner Author

Yes, this injectivity of Fin shows up when defining the univalent subuniverse we're interpreting into:

2DTypes/Pi+/UFin/Univ.agda

Lines 99 to 124 in dc31270

FinSetUU = SubtypeUU FinSet-prop
FinSetUU-is-univalent = SubtypeUU-is-univalent FinSet-prop
FinSet-n-prop : (n : ℕ) SubtypeProp Type₀ (lsucc lzero)
fst (FinSet-n-prop n) X = Σ ℕ λ n Trunc -1 (Fin n == X)
snd (FinSet-n-prop n) X =
all-paths-is-prop
λ { (n , ϕ) (m , ψ)
pair= (Trunc-rec (λ p Trunc-rec (λ q Fin-inj n m (p ∙ ! q)) ψ) ϕ) prop-has-all-paths-↓ }
FinSet-n-UU : (n : ℕ) UU _ _
FinSet-n-UU n = SubtypeUU (FinSet-n-prop n)
FinSet-n-UU-is-univalent : (n : ℕ) is-univalent (FinSet-n-UU n)
FinSet-n-UU-is-univalent n = SubtypeUU-is-univalent (FinSet-n-prop n)
BAutUU : (A : Type i) UU _ _
BAutUU A = SubtypeUU (BAut-prop A)
BAutUU-is-univalent : (A : Type i) is-univalent (BAutUU A)
BAutUU-is-univalent A = SubtypeUU-is-univalent (BAut-prop A)
FinSet-exp-is-univalent : (n : ℕ) is-univalent (BAutUU (Fin n))
FinSet-exp-is-univalent n = BAutUU-is-univalent (Fin n)
UFin-is-univalent = FinSetUU-is-univalent

But there is some Agda hacking necessary in between to make the cardinalities match up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Pi+
Done
Development

Successfully merging a pull request may close this issue.

4 participants