The finite calculus uses constructor trees 𝜏::=𝑐(𝜏1,…,𝜏𝑛), realized atomic signatures 𝐾[𝜏], and declarations 𝐹:𝐾1[𝛼𝑗1],…,𝐾𝑚[𝛼𝑗𝑚]⇒𝗆𝗈𝖽𝐾[𝑐(𝛼1,…,𝛼𝑛)]. Every premise index satisfies 𝑗𝑟∈{1,…,𝑛}. An environment is admissible exactly when all declarations have their displayed interfaces, every premise selects an immediate constructor argument, and no two declarations have the same result head (𝐾,𝑐). Its complete resolution rules are
For the selected overloaded term fragment, ordinary forms elaborate homomorphically and the two evidence-inserting rules are
Θ⊢𝖤𝖰[𝜏]⇓𝗋𝖾𝗌𝑉Γ;Θ⊢𝑒𝑖:𝜏⇝𝑒′𝑖(𝑖=1,2)
Γ;Θ⊢𝖾𝗊[𝜏](𝑒1,𝑒2):𝖡𝗈𝗈𝗅⇝𝑉.𝖾𝗊𝑒′1𝑒′2
E-Eq
Θ⊢𝖲𝖧𝖮𝖶[𝜏]⇓𝗋𝖾𝗌𝑉Γ;Θ⊢𝑒:𝜏⇝𝑒′
Γ;Θ⊢𝗌𝗁𝗈𝗐[𝜏](𝑒):𝖲𝗍𝗋𝗂𝗇𝗀⇝𝑉.𝗌𝗁𝗈𝗐𝑒′
E-Show
The inserted evidence is typed in the target by
𝑃:𝐾[𝑐]∈Θ
Γ;Θ⊢𝑃:𝐾[𝑐]
Mod-Path
Θ(𝐹)=¯𝐾[¯𝛼]⇒𝗆𝗈𝖽𝐾[𝑐(¯𝛼)]Γ;Θ⊢𝑉𝑟:𝐾𝑟[𝜏𝑗𝑟](1≤𝑟≤𝑚)
Γ;Θ⊢𝐹⟨𝑉1,…,𝑉𝑚⟩:𝐾[𝑐(¯𝜏)]
Mod-Functor
Γ;Θ⊢𝑉:𝐾[𝜏]𝑓:𝐴(𝑡)isafieldof𝐾
Γ;Θ⊢𝑉.𝑓:𝐴(𝜏)
Mod-Field
For modular implicits, let I;Γ⊢𝑆⇓𝖼𝖺𝗇𝖽{𝑉1,…,𝑉𝑛} be the finite candidate set after solving the omitted module’s type-component equations. The call boundary is
I;Γ⊢𝑆⇓𝖼𝖺𝗇𝖽{𝑉}Γ⊢𝑓:{𝑀:𝑆}→𝜏1→𝜏2Γ⊢𝑥:𝜏1
I;Γ⊢𝑓𝑥⇝𝑓{𝑉}𝑥:𝜏2
MI-Call
The SI fragment uses restricted types 𝑅::=𝑋∣𝑇→𝑇, full types 𝑇::=𝑅∣𝑇?→𝑇∣∀𝑋.𝑇, and one ordered context with explicit bindings 𝑥:𝑇 and implicit bindings 𝑦:𝑇. Figure 3 is:
𝑥:𝑇∈Γ
Γ⊢𝑥⇒𝑇⇝𝑥
SI-Var
𝑦:𝑇∈Γ
Γ⊢?⇒𝑇⇝𝑦
SI-Query
Γ,𝑥:𝑆⊢𝑒⇐𝑇⇝𝑢
Γ⊢𝜆𝑥.𝑒⇐𝑆→𝑇⇝𝜆𝑥:𝑆∗.𝑢
SI-ArrI
Γ⊢𝑒1⇒𝑆→𝑇⇝𝑢Γ⊢𝑒2⇐𝑆⇝𝑢′
Γ⊢𝑒1𝑒2⇒𝑇⇝𝑢𝑢′
SI-ArrE
𝑦𝖿𝗋𝖾𝗌𝗁Γ,𝑦:𝑆⊢𝑒⇐𝑇⇝𝑢
Γ⊢𝑒⇐𝑆?→𝑇⇝𝜆𝑦:𝑆∗.𝑢
SI-ImpI
Γ⊢𝑒⇒𝑆?→𝑇⇝𝑢Γ⊢?⇐𝑆⇝𝑢′
Γ⊢𝑒⇒𝑇⇝𝑢𝑢′
SI-ImpE
Γ,𝑋⊢𝑒⇐𝑇⇝𝑢
Γ⊢𝑒⇐∀𝑋.𝑇⇝Λ𝑋.𝑢
SI-AllI
Γ⊢𝑒⇒∀𝑋.𝑇⇝𝑢
Γ⊢𝑒⇒[𝑋:=𝑆]𝑇⇝𝑢[𝑆∗]
SI-AllE
Γ⊢𝑒1⇐𝑇⇝𝑢Γ,𝑥:𝑇⊢𝑒2⇒𝑅⇝𝑢′
Γ⊢𝗅𝖾𝗍𝑥:𝑇=𝑒1𝗂𝗇𝑒2⇒𝑅⇝(𝜆𝑥:𝑇∗.𝑢′)𝑢
SI-LetEx
Γ⊢𝑒1⇐𝑇⇝𝑢𝑦𝖿𝗋𝖾𝗌𝗁Γ,𝑦:𝑇⊢𝑒2⇒𝑅⇝𝑢′
Γ⊢𝗅𝖾𝗍?:𝑇=𝑒1𝗂𝗇𝑒2⇒𝑅⇝(𝜆𝑦:𝑇∗.𝑢′)𝑢
SI-LetIm
Γ⊢𝑒⇒𝑅⇝𝑢
Γ⊢𝑒⇐𝑅⇝𝑢
SI-Stitch
Here (−)∗ maps both arrow forms to ordinary System F arrows. The rightmost choice is an external well-scopedness condition on derivations, not a premise of SI-Query.