-
Notifications
You must be signed in to change notification settings - Fork 246
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
cast vs subst in Data.Fin #1610
Comments
To me, the biggest advantage of Side commentary: Using either of them is also misleading; we know that |
Ah, interesting. Thanks for mentioning this difference. From the definitions of |
For concreteness, here are two of the properties (in their join-assocˡ : ∀ {m n p} →
join (m + n) p ∘ ⊎.map₁ (join m n) ∘ ⊎.assocˡ
≗ cast (sym (+-assoc m n p)) ∘ join m (n + p) ∘ ⊎.map₂ (join n p)
join-assocʳ : ∀ {m n p} →
join m (n + p) ∘ ⊎.map₂ (join n p) ∘ ⊎.assocʳ
≗ cast (+-assoc m n p) ∘ join (m + n) p ∘ ⊎.map₁ (join m n) |
Thanks! I’ll meditate on this perspective. |
Mostly because Edit: appeal to |
Thanks for the tips, @JacquesCarette & @gallais! |
I did, and now I am enlightened. I had indeed gotten focused on the identity automorphism. Seeing equality as such (thanks to your remark) puts the problem I was working on into a wider context that I need anyway. Thanks again, @JacquesCarette! |
Seems to me that all of @conal 's questions have been answered, so that this could be closed? |
Thanks again for the answers. |
I’m working on a collection of proofs for submission to
Data.Fin.Properties
. I can phrase & prove viacast
or viasubst Fin
. For my own use, I need thesubst
versions, to fit into a setting more general thanFin
. Ifcast
is a better fit forFin
, I’m happy to adapt via an equivalence propertycast≗subst : ∀ {m n} (m≡n : m ≡ n) → cast m≡n ≗ subst Fin m≡n
(which could also go intoData.Fin.Properties
).Going with
cast
, I also need some properties ofcast
corresponding to ones aboutsubst
inRelation.Binary.PropositionalEquality.Properties
, such assubst-sym-subst
(which I’m callingcast-sym-cast
for now). I don’t imagine we’d want to replicate allsubst
properties forcast
, though.Thoughts?
The text was updated successfully, but these errors were encountered: