You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pi types and Partial types should not be considered inter-convertible #6015
cubicalCubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transpsubject reductionIf you look away, this issue will reduce to a term with a different typetype: bugIssues and pull requests about actual bugs
Partial φ A is essentially defined to be .(IsOne φ) → A, and indeed Agda thinks these types are equal, as can be checked with the following snippet.
dataBool:Setwherett ff : Bool
dataIdₛ {ℓ} (A : SSet ℓ) (a : A) : A → SSet ℓ wherereflₛ : Idₛ A a a
module_ (i : I) where_ : Idₛ (SSet _) (Partial (i ∨ ~ i) Bool) (.(IsOne (i ∨ ~ i)) → Bool)
_ = reflₛ
But Partial φ A isn't literally the same as that pi-type, since the type Partial unfolds into has its domain marked domFinite = True, so that η-equality for elements of Partial φ A is checked by decomposing φ and checking that they agree on all possible substitutions that make φ = i1:
But this same tabulation is not performed for functions-whose-domain-is-IsOne:
_ : Idₛ (.(IsOne (i ∨ ~ i)) → Bool) (primPOr i (~ i) (λ _ → tt) (λ _ → tt)) (λ _ → tt)
-- _ = reflₛ -- does not type-check
Conversion checking of terms is not invariant under definitional equality of the types they are being compared as. Should Agda really think that (Partial (i ∨ ~ i) Bool) and (.(IsOne (i ∨ ~ i)) → Bool) are the same type? The same thing, verbatim, goes for PartialP vs (z : IsOne φ) → A z.
I also think that finite-domain-Π shouldn't be printed in the same way as ordinary Πs — or better yet, prevent the normal form of Partial from being printed as a Π type, somehow.
changed the title [-]Pi types with different domain finiteness should not be equal[/-][+]Pi types and Partial types should not be considered inter-convertible[/+]on Oct 24, 2022
cubicalCubical Agda paraphernalia: Paths, Glue, partial elements, hcomp, transpsubject reductionIf you look away, this issue will reduce to a term with a different typetype: bugIssues and pull requests about actual bugs
Activity
Separate ".(IsOne φ)→A" and "Partial φ A"
Separate ".(IsOne φ)→A" and "Partial φ A"
Separate ".(IsOne φ)→A" and "Partial φ A"
Separate ".(IsOne φ)→A" and "Partial φ A"
Separate ".(IsOne φ)→A" and "Partial φ A"
Separate ".(IsOne φ)→A" and "Partial φ A"
Separate ".(IsOne φ)→A" and "Partial φ A"
Separate ".(IsOne φ)→A" and "Partial φ A" (#6159)
[-]Pi types with different domain finiteness should not be equal[/-][+]Pi types and Partial types should not be considered inter-convertible[/+]