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

Soundness and Logical Relations #136

Closed
4 tasks done
HuStmpHrrr opened this issue Jul 23, 2024 · 13 comments · Fixed by #160
Closed
4 tasks done

Soundness and Logical Relations #136

HuStmpHrrr opened this issue Jul 23, 2024 · 13 comments · Fixed by #160

Comments

@HuStmpHrrr
Copy link
Member

HuStmpHrrr commented Jul 23, 2024

@Ailrun Let's split work in this issue. List and pick stuff that you want to work on so we don't overlap.

@Ailrun
Copy link
Member

Ailrun commented Jul 23, 2024

I will first fix #135.

@HuStmpHrrr
Copy link
Member Author

I will look into realizability. subtyping is gonna be interesting. @Ailrun do you want to handle it? or do you want to swap.

@Ailrun
Copy link
Member

Ailrun commented Jul 24, 2024

By subtyping, you mean subtyping cases? I didn't get it when you said subtyping logrel for soundness, as I expected something like
https://gitlab.com/JasonHuZS/practice/-/blob/master/MLTT/Soundness/Terms.agda#L22-26
(that using syntactic judgement) or similar.

@HuStmpHrrr
Copy link
Member Author

there should be lemmas for subtyping in the logical relations too. it should quantify what happens to the logical relation when there is a subtyping in the domain.

@Ailrun
Copy link
Member

Ailrun commented Jul 25, 2024

You mean something like the following?

Lemma glu_univ_elem_typ_subtyping : forall {i a a' P P' El El' Γ A},
    {{ Sub a <: a' at i }} ->
    {{ DG a ∈ glu_univ_elem i ↘ P ↘ El }} ->
    {{ DG a' ∈ glu_univ_elem i ↘ P' ↘ El' }} ->
    P Γ A ->
    exists A', {{ Γ ⊢ A ⊆ A' }} /\ P' Γ A'.

(This one is not directly provable)

@HuStmpHrrr
Copy link
Member Author

It should be universal over A', but otherwise I think this should be the theorem. Not sure if there's more.

@Ailrun
Copy link
Member

Ailrun commented Jul 25, 2024

How it can be universal in A'? I mean, A' should be a specific type that corresponds to a', not any supertype of A.

@HuStmpHrrr
Copy link
Member Author

put P' Γ A' in the implication too. you just prove A is a subtype of A'.

@Ailrun
Copy link
Member

Ailrun commented Jul 26, 2024

Then what would that provide? For subtyping cases we need if El G M A m then El' G M A' m for some supertype A', and this requires something like above.

@HuStmpHrrr
Copy link
Member Author

this one will also prove the previous lemma as part of it. proving this one should also work.

@Ailrun
Copy link
Member

Ailrun commented Jul 26, 2024

Ah in that sense.

@Ailrun
Copy link
Member

Ailrun commented Jul 26, 2024

It seems like the subtyping lemmas require realizability. In the following lemma,

Lemma glu_univ_elem_typ_per_univ_escape : forall {i a a' P P' El El' Γ A A'},
    {{ Dom a ≈ a' ∈ per_univ i }} ->
    {{ DG a ∈ glu_univ_elem i ↘ P ↘ El }} ->
    {{ DG a' ∈ glu_univ_elem i ↘ P' ↘ El' }} ->
    {{ Γ ⊢ A ® P }} ->
    {{ Γ ⊢ A' ® P' }} ->
    {{ Γ ⊢ A ≈ A' : Type@i }}.

we need {{{ Γ, IT ⊢ # 0 : IT[Wk] ® ⇑! A 0 ∈ IEl }}} in pi case, which probably is derivable after realizability.

@HuStmpHrrr
Copy link
Member Author

ok i see. every lemma from Agda is proved?

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

Successfully merging a pull request may close this issue.

2 participants