Repository navigation
Conversation
|
In lieu of an actual review, two quick observations
Eg. I think there is a reason that |
|
Indeed I've found infix 8 _^_
_^_ : Set a → (n : ℕ) → Set (lconst n a)
A ^ n = HomoProduct n Aand all the operations with more generic ones from the lookup : ∀ {n} → A ^ n → (k : Fin n) → Projₙ _ k
lookup {n = n} as k = projₙ n k as? If that is the case I followed your suggestion and try to tackle the assoc but It seems I'm failing at the very first step of even stating the type of it: assocʳ : ∀ m n {lsa lsb} {as : Sets m lsa} {bs : Sets n lsb} →
Product (m + n) (sappend m n as bs) → {!(Product m as) × (Product n bs)!}the Anyway it seems I should define all the different functions for Sets/Levels accordingly. btw. There is really no other point to this comment just that: "I'm looking into what you have said" and it's probably gonna take a while :) |
|
Regarding your reply, something like lappend : ∀ m n → Levels m → Levels n → Levels (m + n)
lappend zero n las lbs = lbs
lappend (suc m) n (l , las) lbs = l , lappend m n las lbs
sappend : ∀ m n {lsa lsb} → Sets m lsa → Sets n lsb → Sets (m + n) (lappend m n lsa lsb)
sappend zero n as bs = bs
sappend (suc m) n (a , as) bs = a , sappend m n as bs
sassocʳ : ∀ m n {lsa lsb} {as : Sets m lsa} {bs : Sets n lsb} →
Product⊤ (m + n) (sappend m n as bs) → (Product⊤ m as) × (Product⊤ n bs)
sassocʳ zero n {as = as} {bs = bs} p = _ , p
sassocʳ (suc m) n {as = as} {bs = bs} (a , p) =
let (x , y) = sassocʳ m n p in (a , x) , ymight do the trick, but yes, exploring the fine details might get complicated (and the But the real intention of my comment was roughly:
Glad to offer more feedback as things progress... |
|
Ok, I think I can articulate better. I was confused with I've opened #3119 and #3120 to have some more concrete discussion items (I wanted to do a stacked pr, hence 2 different prs, but it seems that won't work for forks). Anyway the there is split/append and roundtrip identity proof. I've opted to define However when trying to use it for |
JacquesCarette
left a comment
There was a problem hiding this comment.
On the face of it, this code looks good. But as @jamesmckinna says, there are bigger design considerations we ought to think about.
I don't think it changes much. I think that usefulness of those PRs is severely limited by the level shenanigans.
which leaves us with:
|
|
Re: most recent commit 9ec2f47 If it was your intention to make this part of this PR, can I respectfully request that this kind of local configuration be kept out of Mixing up 'infrastructure' PRs with those involving actual agda code seems actively a Bad Idea/AntiPattern for development... |
No it wasn't, I do that for my copy, but I've messed up here. |
|
Oh, I've noticed that I've opened this PR from |
|
Oh no! Commiserations... unfortunately I don't have a local copy from which you could restore. |
no need to worry. I have my own layer on top of stdlib and contribute back things that I think would be useful to others. I think I have everything that was here minus potential review changes.
sure, although it would be good to settle on what we want. |
Recently I've came across
Data.Vec.Recursivewhich seemed interesting enough for me to play with it. However there is lackluster support for it. So I thought this would be some grunt work that I could contribute to the library. Everything here is pretty mechanical translation fromData.Vec.Relation.Binary.Pointwise.Inductivewith onlysplitAtbeing included for completeness. I couldn't getappendbecause of the indices_+ 0. Perhaps when I addcastnext this would budge.