Logic enrichment, same-subject types, and erased induction
appendix sectionrules
Logic enrichment, same-subject types, and erased induction
The LTT logical and set fragments
For typed contexts Γ and proposition lists Δ, the logical rules used in chapter 92 are
Γ𝗏𝖺𝗅𝗂𝖽
Γ⊢⊥𝖯𝗋𝗈𝗉
LTT–F
Γ⊢𝑃𝖯𝗋𝗈𝗉Γ⊢𝑄𝖯𝗋𝗈𝗉
Γ⊢𝑃⇒𝑄𝖯𝗋𝗈𝗉
LTT–F
Γ⊢𝐴𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝑃𝖯𝗋𝗈𝗉
Γ⊢∀𝑥:𝐴.𝑃𝖯𝗋𝗈𝗉
LTT–F
Γ⊢𝑎:𝖴Γ⊢𝑡:𝖳(𝑎)Γ⊢𝑋:𝖲𝖾𝗍(𝖳(𝑎))
Γ⊢𝑡∈𝑎𝑋𝖯𝗋𝗈𝗉
LTT–F
𝑃∈Δ
Γ;Δ⊢𝑃
LTT-Hyp
Γ;Δ,𝑃⊢𝑄
Γ;Δ⊢𝑃⇒𝑄
LTT–I
Γ;Δ⊢𝑃⇒𝑄Γ;Δ⊢𝑃
Γ;Δ⊢𝑄
LTT–E
Γ,𝑥:𝐴;Δ⊢𝑃𝑥∉FV(Δ)
Γ;Δ⊢∀𝑥:𝐴.𝑃
LTT–I
Γ;Δ⊢∀𝑥:𝐴.𝑃Γ⊢𝑡:𝐴
Γ;Δ⊢𝑃[𝑡/𝑥]
LTT–E
Γ;Δ,𝑃⇒⊥⊢⊥
Γ;Δ⊢𝑃
LTT-Classical
The small-set rules, in formation through uniqueness order, are
Γ⊢𝑎:𝖴
Γ⊢𝖲𝖾𝗍(𝖳(𝑎))𝗍𝗒𝗉𝖾
LTT-Set-F
Γ⊢𝑎:𝖴Γ,𝑥:𝖳(𝑎)⊢𝑝𝗉𝗋𝗈𝗉
Γ⊢{𝑥:𝖳(𝑎)∣𝑝}:𝖲𝖾𝗍(𝖳(𝑎))
LTT-Set-I
Γ⊢𝑋:𝖲𝖾𝗍(𝖳(𝑎))Γ⊢𝑡:𝖳(𝑎)
Γ⊢𝑡∈𝑎𝑋𝖯𝗋𝗈𝗉
LTT-Set-E
Γ,𝑥:𝖳(𝑎)⊢𝑝𝗉𝗋𝗈𝗉Γ⊢𝑡:𝖳(𝑎)
Γ;∅⊢(𝑡∈𝑎{𝑥:𝖳(𝑎)∣𝑝})⇔𝖵(𝑝[𝑡/𝑥])
LTT-Set-β
Γ⊢𝑋:𝖲𝖾𝗍(𝖳(𝑎))Γ⊢𝑌:𝖲𝖾𝗍(𝖳(𝑎))Γ;∅⊢∀𝑥:𝖳(𝑎).(𝑥∈𝑎𝑋⇔𝑥∈𝑎𝑌)
Γ⊢𝑋≡𝑌:𝖲𝖾𝗍(𝖳(𝑎))
LTT-Set-η
For 𝑏:𝖭→𝖴, put 𝐵(𝑛)=𝖳(𝑏𝑛). Given 𝑐:𝐵(0) and 𝑓:Π𝑛:𝖭.𝐵(𝑛)→𝐵(𝑆𝑛), recursion has type 𝗋𝖾𝖼𝐵(𝑐,𝑓):Π𝑛:𝖭.𝐵(𝑛) with equations 𝗋𝖾𝖼𝐵(𝑐,𝑓,0)≡𝑐 and 𝗋𝖾𝖼𝐵(𝑐,𝑓,𝑆𝑛)≡𝑓(𝑛,𝗋𝖾𝖼𝐵(𝑐,𝑓,𝑛)) (LTT-Nat-rec, LTT-Nat-rec-0, and LTT-Nat-rec-𝑆). Rule LTT-Nat-Ind0 is
Γ,𝑛:𝖭⊢𝑝𝗉𝗋𝗈𝗉Γ;Δ⊢𝖵(𝑝[0/𝑛])Γ,𝑛:𝖭;Δ,𝖵(𝑝)⊢𝖵(𝑝[𝑆𝑛/𝑛])
Γ;Δ⊢∀𝑛:𝖭.𝖵(𝑝)
LTT-Nat-Ind_0
Dependent intersections and System S self types
Γ⊢𝐴𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾
Γ⊢𝑥:𝐴∩𝐵𝗍𝗒𝗉𝖾
DI-F
Γ⊢𝑎:𝐴Γ⊢𝑏:𝐵[𝑎/𝑥]erase(𝑎)=𝛽𝜂erase(𝑏)
Γ⊢𝖻𝗈𝗍𝗁(𝑎,𝑏):𝑥:𝐴∩𝐵
DI-I
Γ⊢𝑑:𝑥:𝐴∩𝐵
Γ⊢𝗅𝖾𝖿𝗍(𝑑):𝐴
DI-E_1
Γ⊢𝑑:𝑥:𝐴∩𝐵
Γ⊢𝗋𝗂𝗀𝗁𝗍(𝑑):𝐵[𝗅𝖾𝖿𝗍(𝑑)/𝑥]
DI-E_2
The computations and uniqueness are 𝗅𝖾𝖿𝗍(𝖻𝗈𝗍𝗁(𝑎,𝑏))≡𝑎,𝗋𝗂𝗀𝗁𝗍(𝖻𝗈𝗍𝗁(𝑎,𝑏))≡𝑏,𝖻𝗈𝗍𝗁(𝗅𝖾𝖿𝗍(𝑑),𝗋𝗂𝗀𝗁𝗍(𝑑))≡𝑑. These are DI-𝛽1, DI-𝛽2, and DI-𝜂.
System S implicit products have
Γ⊢𝐴𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾
Γ⊢∀𝑥:𝐴.𝐵𝗍𝗒𝗉𝖾
S–F
Γ,𝑥:𝐴⊢𝑡:𝐵𝑥∉FV(𝑡)
Γ⊢𝑡:∀𝑥:𝐴.𝐵
S–I
Γ⊢𝑡:∀𝑥:𝐴.𝐵Γ⊢𝑢:𝐴
Γ⊢𝑡:𝐵[𝑢/𝑥]
S–E
Rule S-∀-𝛽 records erase(𝑡)=erase(𝑡). Self formation, generation, and instantiation are
Γ,𝑥:𝜄𝑥.𝑇⊢𝑇𝗍𝗒𝗉𝖾
Γ⊢𝜄𝑥.𝑇𝗍𝗒𝗉𝖾
S-Self-F
Γ⊢𝑡:𝑇[𝑡/𝑥]Γ⊢𝜄𝑥.𝑇𝗍𝗒𝗉𝖾
Γ⊢𝑡:𝜄𝑥.𝑇
S-Self-Gen
Γ⊢𝑡:𝜄𝑥.𝑇
Γ⊢𝑡:𝑇[𝑡/𝑥]
S-Self-Inst
Rule S-Self-Erase states that the generation and instantiation views both erase to erase(𝑡).
Very-dependent functions
Write 𝑔:𝖯𝗋𝖾𝖽(𝑦) for the predecessor function at 𝑦.