Last active
November 14, 2018 14:07
-
-
Save laMudri/2c9ccaf8c38c68ccd922c85e0f3c619f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dot : ∀ {γ} (Γ Γ′ : Context γ) → Mult | |
dot ∅ ∅ = 0# | |
dot (Γ , π ∙ _) (Γ′ , π′ ∙ _) = dot Γ Γ′ + (π * π′) | |
-- Induction on the size of the output | |
-- (filling in each item of the output vector) | |
_⊛′_ : ∀ {γ δ} | |
→ (Δ : ∀ {B} → δ ∋ B → Context γ) | |
→ (Γ : Context γ) | |
→ Context δ | |
_⊛′_ {γ} {∅} Δ Γ = ∅ | |
_⊛′_ {γ} {δ , _} Δ Γ = ((Δ ∘ S_) ⊛′ Γ) , dot (Δ Z) Γ ∙ _ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment